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
Youare 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:
vGlobal or local work areas specified when an exit program is enabled, are always
in CICS key.
vAny working storage obtained for the exit program is in the key set by the
TASKDATAKEYof the transaction under which the exit program is invoked.
vTask-relateduser 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 TASKDATAKEYof 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 TASKDATAKEYoption by
specifying either CICSDATAKEYor 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
Youmight 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:
vIf 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