Reentrancy considerations resulting from XPI calls

During an XPI call, CICS® might give control to another task while processing the XPI call. This second task could call the same exit program and make the same XPI call, possibly with different parameter values. In this situation, you must ensure that lockout situations do not occur.

While processing an XPI call, CICS might encounter another user exit point that uses the same user exit program. Therefore, the XPI parameter lists must be built in storage associated with a single invocation of the exit program.

If your exit program is a global user exit, CICS provides it with 1024 bytes of LIFO storage, which is exclusive to a single invocation of your exit program. Your exit program can access this storage using parameter UEPXSTOR of the DFHUEPAR parameter list. Use this storage to base the DSECT provided by the DFHxxyyY copy book when building the XPI parameter list. In this way, the parameters are not corrupted if the exit program is reentered.

Parameter lists for the XPI services provided here do not exceed 256 bytes. The remaining 768 bytes of the UEPXSTOR storage can be used by your exit program for its own purpose. It is expected that the 768 bytes of spare storage will, in most cases, avoid the need for your exit programs to obtain more storage. If you do need to obtain more than the extra 768 bytes provided, obtain it by either a DFHSMMCX FUNCTION (GETMAIN) macro, or an MVS™ GETMAIN request.

Information to be kept across invocations of an exit program can be stored in the global work area that you can define for an exit program (or group of exit programs). The 1024 bytes of LIFO storage cannot be used for this purpose because it is dynamic.