IBM SC34-6814-04 Server User Manual


 
Chapter 1. Global user exit programs
You can use the CICS global user exit points, in conjunction with programs of a
special type that you write yourself (global user exit programs), to customize your
CICS system.
A global user exit point, sometimes referred to as a global user exit is a place in a
CICS module or domain at which CICS can transfer control to a global user exit
program that you have written and at which CICS can resume control when your
exit program has finished its work.
Each global user exit point has a unique identifier, and is located at a point in the
module or domain at which it could be useful to do some extra processing. For
example, at exit point XSTOUT in the statistics domain, an exit program can be
given control before each statistics record is written to the SMF data set, and can
access the relevant statistics record. You might want to use an exit program at this
exit point to examine the statistics record and suppress the writing of unwanted
records.
Global user exit support is provided automatically by CICS. However, there are
several conventions that govern how you write your exit program, which are
described in “Writing global user exit programs.” Because global user exit programs
work as if they were part of the CICS module or domain, there are limits on the use
you can make of CICS services. Most global user exit programs cannot use EXEC
CICS commands, but can invoke some CICS services using the exit programming
interface (XPI). For more information, see “Using CICS services” on page 4.
Note: Neither source nor object compatibility of CICS management modules is
guaranteed from release to release. Any changes that affect exit programs
are documented in the appropriate manual.
Writing global user exit programs
A global user exit program must be written in assembler language and must be
quasireentrant. However, if your user exit program calls the XPI, it must be fully
reentrant. (For details about coding programs using XPI calls, refer to Chapter 3,
“The user exit programming interface (XPI),” on page 305.)
Remember: A “reentrant” program is coded to allow one copy of itself to be used
concurrently by several tasks; it does not modify itself while running. A
“quasireentrant” program is serially reusable by different tasks. When
it receives control it must be in the same state as when it relinquished
control. Such a program can modify itself while running, and is
therefore not fully reentrant.
Register conventions
Register values are provided on entry to an exit program and only certain register
values are guaranteed.
The register values that you can use on entry to an exit program are as follows:
v Register 1 contains the address of the user exit parameter list DFHUEPAR.
Write-to-operator (WTO) commands use register 1. If your exit program uses
WTO commands, you should save the address of DFHUEPAR first.
© Copyright IBM Corp. 1977, 2011 3