IBM SC33-1683-02 Server User Manual


 
Sample exit program design
A sample XZIQUE exit program is provided with CICS Transaction Server for
OS/390 Release 3 as a base for you to design your own global user exit program. It
is called DFH$XZIQ, and is supplied in the CICSTS13.CICS.SDFHSAMP library.
The DSECT used by the sample program to map the area addressed by
UEPZDATA is called DFHXZIDS, and this is supplied in the
CICSTS13.CICS.SDFHMAC library.
As supplied, the sample exit program implements the same basic function as
described for the QUEUELIMIT and MAXQTIME parameters on the connection
resource definition. If the XZIQUE exit is not enabled, CICS uses these parameters
to control the existence and length of the queue of allocate requests. If you enable
the exit, the parameters from the connection definition are passed to your XZIQUE
global user exit program, which can change the way in which these parameters are
used.
The exit program also demonstrates how to control allocate requests for a particular
modegroup, based on the same QUEUELIMIT and MAXQTIME parameters.
Overview of the sample exit program:
The program uses the exit-specific
parameters passed by CICS to determine the state of the connection, and to
request the appropriate action, as follows:
1. The connection is operating normally; a queue may exist, but is of short length.
In this case, the exit program returns with UERCAQUE to indicate that CICS is
to queue the request.
2. The response from the partner system is slower than the rate of requests
demands, and the queue length has grown to the limit specified on the
QUEUELIMIT parameter. The partner system is still operating normally, but is
overloaded.
In this case, the exit program returns with UERCAPUR to indicate that CICS is
to purge the request.
3. The queue has reached the limit specified by the QUEUELIMIT parameter, and
requests that join the queue are expected to take longer to be satisfied than the
time defined by the MAXQTIME parameter. (The estimated time for a request to
complete is calculated by dividing the number of successful requests since the
queue first formed by the time elapsed since it formed. These statistics are
passed to the exit in the parameter list.)
These criteria are used to determine that the connection is not operating
correctly, and that continued queuing of tasks is not helpful. In this case:
v The exit returns with UERCAKLL requesting CICS to purge all queued user
requests from the connection. The SYSIDERR condition is returned to the
application program.
v CICS issues message DFHZC2300 to warn that a connection is not
performing as expected.
4. The queue has been purged as a result of a previous invocation of the global
user exit program, there are still no free sessions, and the request is about to
be queued.
In this case, the exit program returns with UERCAPUR to indicate that CICS is
to purge the request. This also leaves the UEPRC8 flag set.
5. The queue has been purged as a result of a previous invocation of the global
user exit program. A new allocate request has been received and is about to be
allocated because a session has become free.
VTAM working-set module exits
244
CICS TS for OS/390: CICS Customization Guide