IBM SC33-1683-02 Server User Manual


 
another program (via a link or transfer-control command), the program thus invoked
executes according to the execution key (EXECKEY) defined in its program
resource definition.
Important
You are strongly recommended to specify EXECKEY(CICS) when defining
both task-related user exit programs, and programs to which an exit program
passes control.
Data storage key for task-related user exit programs
The storage key of storage used by task-related user exit programs depends on
how the storage is obtained:
v Global or local work areas specified when an exit program is enabled, are always
in CICS key.
v Any working storage obtained for the exit program is in the key set by the
TASKDATAKEY of the transaction under which the exit program is invoked.
v Task-related user exit programs can use EXEC CICS commands to obtain
storage by issuing:
Explicit EXEC CICS GETMAIN commands
Implicit storage requests as a result of EXEC CICS commands that use the
SET option.
The default storage key for storage obtained by EXEC CICS commands is set by
the TASKDATAKEY of the transaction under which the exit program is invoked.
As an example, consider a transaction defined with TASKDATAKEY(USER) that
causes a task-related user exit program to be invoked. In this case, any implicit
or explicit storage acquired by the exit program by means of an EXEC CICS
command is, by default, in user-key storage. However, on an EXEC CICS
GETMAIN command, the exit program can override the TASKDATAKEY option by
specifying either CICSDATAKEY or USERDATAKEY.
Recursion within a task-related user exit program
The task-related user exit has the ability to invoke itself recursively. It can do this,
for example, by issuing a DFHRMCAL call to its own entry name (as specified on
the EXEC CICS ENABLE command). It can also be entered recursively if it
performs an EXEC CICS SYNCPOINT when it is interested in SYNCPOINT
invocations.
Using CICS services in your task-related user exit program
You might find some CICS services useful in your exit program. These can be
invoked using EXEC CICS commands. However, you should take note of the
following:
v If your program is invoked because of a CICS abend, it must not use any CICS
services. See “Coding a program to be invoked at CICS termination” on
page 275.
the task-related user exit program
268
CICS TS for OS/390: CICS Customization Guide