IBM SC34-6814-04 Server User Manual


 
If the new program supplies a different return code value from the current
value addressed by UEPCRCA, CICS ignores both values and resets the
“current return code” to the default value, usually UERCNORM, before calling
any further exit programs for that exit point.
If the new program sets an eligible value in register 15 and changes the
“current value” field to match (as addressed by UEPCRCA), the new value is
adopted and passed on to the next program (if any), or back to the calling
CICS module or domain.
The following code snippet shows how a new exit program can set a different
return code from the “current return code” returned by a previous exit
program, and cause CICS to act on the new code.
LA R15,UERCTDOK Set the contents of reg 15 to a value of 4
L R6,UEPCRCA Set reg 6 to the address of the half word
* containing the current return code
STH R15,0(,6) Store the new return code at the location
* of the current return code.
...
Invoking a single exit program at more than one exit
To invoke a single exit program from more than one exit point, you must issue an
ENABLE command for each of the exit points.
For programming information about how to issue an ENABLE command, see the
CICS System Programming Reference. Be careful to specify GALENGTH or
GAENTRYNAME on only the first ENABLE command, otherwise ‘INVEXITREQ’ may
be returned.
Take into account the restrictions that apply to the use of CICS services, because
these are dictated by the exit point itself rather than by the exit program. A
command that can be issued from one exit point might cause problems when
issued from a different exit point.
The global work area is associated with the exit program, rather than with the exit
point: this means that the same global work area is used at each of the exit points
at which the exit program is invoked.
Making programs threadsafe
All user programs defined by a PROGRAM resource definition have a
CONCURRENCY attribute, which can be either QUASIRENT or THREADSAFE. By
default, global user programs are defined as quasi-reentrant, which means they are
given control on the CICS QR TCB.
If the task under which the global user exit is invoked is executing on an open TCB,
and the exit program is defined as quasi-reentrant, CICS switches back to the QR
TCB for the execution of the exit program.
To avoid unnecessary TCB switching, you are strongly recommended to make sure
that your global user programs conform to threadsafe programming standards.
When you are satisfied that your exit programs are threadsafe, ensure that they are
defined as CONCURRENCY(THREADSAFE). This is particularly important for exits
that are invoked by tasks that are using the CICS DB2
®
interface and running under
an L8 TCB.
14 Customization Guide