IBM SC34-6814-04 Server User Manual


 
The local work area
A local work area is associated with a single task and lasts only for the duration of
the task. It is for the use of a single task-related user exit program. It can be
thought of as a logical extension to the transaction work area (TWA, TWACOBA)
that is exclusively for the exit program’s use. It is specified using the TALENGTH
option of the EXEC CICS ENABLE command and is accessed using the UEPTAA
parameter of DFHUEPAR.
If the TRUE is enabled with the LINKEDITMODE option of the EXEC CICS
ENABLE command and link-edited AMODE 31, local work areas are located above
the 16MB line; otherwise, they are below the line.
Coding a program to be invoked by the CICS SPI
If you enable your task-related exit program with the SPI option of the EXEC CICS
ENABLE PROGRAM command (or your program “expresses interest” in SPI calls
by setting the SPI bit-mask in the schedule flag word), your program is invoked to
satisfy EXEC CICS INQUIRE EXITPROGRAM commands that query whether the
exit program is connected to its resource manager, and its entryname-qualifier. (For
information about the INQUIRE EXITPROGRAM command, see INQUIRE
EXITPROGRAM, in the CICS System Programming Reference manual.)
When invoked for SPI calls, your exit program should:
v Indicate whether it is connected to its external resource manager, by returning
the appropriate value in the first field addressed by the caller’s parameter list.
The equated values are:
UERTCONN
(X'80') The exit is connected to its resource manager.
UERTNCONN
(X'40') The exit is not connected to its resource manager.
v Return the resource manager qualifier—that is, the entryname-qualifier, as
returned by the UEPRMQUA parameter of an API call, and used on an EXEC
CICS RESYNC command—in the second field addressed by the caller’s
parameter list.
Typically, both the above pieces of information are kept in the exit program’s global
work area. The caller parameter list for SPI calls is described in “CICS SPI
parameters” on page 279.
The RMI SPI call allows a task-related user exit to be called by long-running
monitor tasks, even if it has been disabled and reenabled since it was last called by
the task. (All other types of RMI call fail if this is the case.)
Note: When invoked for an SPI call, your exit program should not rely on the
contents of the task local work area. If the exit has been disabled and
reenabled, a new version may have been loaded, which may have a different
mapping of the task local work area. The long-running task, however, is
running with the original task local work area allocated to it on its first call.
Coding a program to be invoked by the CICS syncpoint manager
All task-related user exit programs can be invoked by the CICS syncpoint manager.
An exit program must “schedule” the syncpoint manager by setting the syncpoint
manager bit-mask in the schedule flag word. The bit-mask must be set after every
Chapter 2. Task-related user exit programs 293