IBM SC33-1683-02 Server User Manual


 
recursive command (such as a TS command at exit point XTSEREQ). The exits
most likely to be affected provide a recursion count parameter, UEPRECUR, that
you can use to prevent such loops.
Important
When coding user exit programs, you should bear in mind that the code is
executed as an extension of CICS code, rather than as a transaction, and any
errors could have disastrous results.
Defining, enabling, and disabling an exit program
When you have written an exit program, you must define it to CICS using the CEDA
DEFINE PROGRAM command. (Note that you must specify RELOAD(NO).)
Having defined the exit program, you must also enable it. You do this using the
EXEC CICS ENABLE command.
3
When you have finished using the exit program,
you should disable it, using the EXEC CICS DISABLE command.
Note: If a global user exit program is enabled before it has been installed and
LPA=YES is specified as a system initialization parameter, CICS scans the
LPA for the program. If message DFHLD0107I is issued, it means that CICS
was unable to find the program in the LPA and is using the DFHRPL version.
For programming information about the EXEC CICS ENABLE and DISABLE
commands, see the
CICS System Programming Reference
manual. For examples
of how to enable and disable global user exit programs, see the sample programs
listed on page 14.
Invoking more than one exit program at a single exit
There may be times when you want to invoke more than one exit program from a
single global user exit point. For example, you might have two or more application
packages that supply programs for the same CICS exit. Although such programs
may work independently, you should note the following points:
v An exit program is only called at an exit if it has been made available for
execution with the START option of the EXEC CICS ENABLE command. The
order of invocation, when more than one exit program has been started at an exit
point, is the order in which the programs were activated (that is, the order in
which the EXEC CICS ENABLE commands associated them with the exit point).
When programs work on the same data area, you should consider the order in
which they are invoked. For example, in a terminal control output exit, an exit
program might manipulate the same message in different ways, depending on
the way an earlier exit program acted.
v Return code management is more complicated than it is for single programs.
Each exit program sets a return code in register 15 as usual. The second and
subsequent programs invoked from a single exit point can access the return code
value set by the preceding program (the “current return code”) using the
parameter UEPCRCA of DFHUEPAR.
3. Exit programs for exits in the user log record recovery program and the file control recovery control program can also be enabled
using the TBEXITS system initialization parameter.
global user exit programs
Chapter 1. Global user exit programs 13