IBM SC33-1683-02 User Manual

Page 177

Advertising
background image

Using the task token UEPTSTOK

UEPTSTOK provides the address of a 4-byte area that you can use to pass
information between successive interval control requests in the same task. (By
contrast, UEPICTOK is usable only for the duration of a single interval control
request, because its contents may be destroyed at the end of the request.) For
example, if you need to pass information between successive invocations of the
XICEREQ exit, UEPTSTOK provides a means of doing this.

The EIB

Copies of EIBRSRCE, EIBRCODE, EIBRESP, and EIBRESP2 are passed to the
exit, so that you can:

v

Modify or set completion and resource information in XICEREQ and XICEREQC

v

Examine completion and resource information in XICEREQC.

You can update the copies of EIBRSRCE, EIBRCODE, EIBRESP, and EIBRESP2
that you are given in the parameter list. Interval control copies your values into the
real EIB after the completion of XICEREQC; or if you specify a return code of
‘bypass’ in XICEREQ.

You must set valid interval control responses. You must set all three of EIBRCODE,
EIBRESP, and EIBRESP2 to a consistent set of values, such as would be set by
CICS interval control to describe a valid completion. CICS does not police the
consistency of EIBRCODE, EIBRESP, and EIBRESP2
. However, if EIBRCODE is
set to a non-zero value and EIBRESP is set to zero, CICS overrides EIBRESP with
a non-zero value. To aid you in setting the values of EIBRCODE, EIBRESP, and
EIBRESP2, the values used by interval control are specified in DFHICUED.

Example of how XICEREQ and XICEREQC can be used

XICEREQ and XICEREQC can be used for a variety of purposes. One example of
a possible use is given below.

In this example, XICEREQ and XICEREQC are used to route START requests to a
number of different CICS regions to provide a simple load balancing mechanism.
The example shows only the capabilities of the exits; it is not intended to indicate
an ideal way of achieving the function.

In XICEREQ:

1. Scan the global work area (GWA) to locate a suitable CICS region (for

example, the region currently processing the least number of START
requests).

2. Having decided which system to route the request to, increment the use

count for this system.

3. Obtain a 4-byte area in which to store the SYSID for this request. This

can be allocated from the GWA to avoid issuing a GETMAIN. If the area
is obtained by issuing a GETMAIN, set UEPICTOK to the address of
the storage obtained.

4. Set IC_ADDR7 to be the address of the 4-byte area so that XICEREQC

can also use this area.

5. If setting IC_ADDR7 now makes it the last address, set the high-order

bit in the address, and reset the high-order bit in what was previously
the last address.

interval control EXEC interface program exits

Chapter 1. Global user exit programs

145

Advertising