IBM SC33-1683-02 Server User Manual


 
invocation is at start- or end-of-task, you can examine the CICS task manager
parameters described in “CICS task manager parameters” on page 260. Typically,
your program shows interest in task manager events if it needs to save task-related
information, such as performance or accounting data, before the task ends.
Limitations
If your exit program is invoked at end-of-task, you must be alert to possible
limitations on exit program activity at task-detach. For example:
v Do not update any CICS resources at all during a task-detach exit call, because
the CICS syncpoint manager is not invoked again for that task. Note also that all
resources (terminals, and so on) except task-storage have been released by
end-of-task.
Note: You should also be aware that transactions with resource security or
command security defined may not run successfully after the terminal has
been released. See the
CICS RACF Security Guide
to determine which
resources and commands are subject to security checking. Failure to
observe these limitations can result in an ABENDAEY7 - NOTAUTH
condition arising.
v It is possible to schedule a new CICS task from your exit program using the
EXEC CICS START command and to pass data to a new task. However, you
should note that EXEC CICS START uses a temporary storage queue to pass
data to the new transaction. If this queue is recoverable (DFHTST
TYPE=RECOVERY), it is locked to the detaching task. It is never unlocked,
because, when the task-detach exit call is made, the resources of the detaching
task have already been freed. Use of the PROTECT option would cause a
different problem: the new task could not be scheduled until the next syncpoint of
the detaching task, but there will be no such syncpoint.
v It is recommended that you do not access remote resources using a task-related
user exit program. However, if you do so, then you must understand fully the
circumstances in which the function shipping conversation may be terminated.
Coding a program to be invoked at CICS termination
If you specify the SHUTDOWN option when enabling your task-related user exit
program, it is invoked at system termination. The CICS system termination manager
passes the exit program the address of a one-byte code that identifies the type of
termination (see “CICS termination manager parameters” on page 261). You can
use this invocation of your program to do processing appropriate to the type of
termination. For example, at an orderly shutdown you could use it, rather than a
PLT program, to shut down the adapter; at a CICS abend you could use it to take
special actions, related to the seriousness of the abend.
Limitations
Note that, due to the nature of CICS abends and operator cancels, there is no
guarantee that CICS will be able to invoke your exit program at system termination,
even if you have specified SHUTDOWN; it may be too impaired to do so.
the task-related user exit program
Chapter 2. Task-related user exit programs 275