vOn an immediate shutdown, CICS does not allow running tasks to finish and
backout is not performed until emergency restart. This can cause an
unacceptable number of units of work to be shunted, and locks to be retained
unnecessarily.
The purpose of the shutdown assist transaction is to help solve these problems;
that is, to ensure that as many tasks as possible commit or back out cleanly within
a reasonable time.
The default shutdown assist transaction is CESD, which starts the CICS-supplied
program DFHCESD. DFHCESD attempts to purge and back out long-running tasks
using increasingly stronger techniques. It ensures that as many tasks as possible
commit or back out cleanly, enabling CICS to shut down in a controlled manner.For
information about DFHCESD, and about how to write your own shutdown assist
transaction, see the
CICS Operations and Utilities Guide
.
General considerations
The comments in the remainder of the chapter apply to both initialization and
shutdown programs.
vIt is recommended that you terminate all PLTprograms with an EXEC CICS
RETURN command.
vPLTprograms receive control in primary-space translation mode. (For information
about translation modes, see the
IBM ESA/370 Principles of Operation
manual.)
They must return control to CICS in the same mode, and must restore any
general purpose registers or access registers that they use.
vAll PLTPI programs run under the CICS internal transaction name CPLT.
Therefore, because CICS internal transactions are defined with the WAIT indoubt
attribute set to 'YES', an in-doubt failure that occurs while running a PLTPI
program causes the relevant unit of work to be shunted. The PLTPIprogram
abends ASP1, and CICS runs the next program defined in the PLTPItable, if any.
vPLTSD programs run under the transaction that issued the PERFORM
SHUTDOWN command. The CEMT transaction is defined with WAIT(YES).
Therefore, if shutdown is as the result of a CEMT PERFORM SHUTDOWN
command, an in-doubt failure that occurs while running a PLTSD program causes
the unit of work to be shunted. If, however, shutdown is as the result of a user
transaction issuing an EXEC CICS PERFORM SHUTDOWN command, whether
an in-doubt failure causes the unit of work to be shunted or a forced decision
taken depends on the indoubt attributes of the user transaction. For details of the
indoubt options of the CEDA DEFINE TRANSACTION command, see the
CICS
Resource Definition Guide
.
Storage keys for PLT programs
Youneed to consider the following (whether or not you are running CICS with the
storage protection facility):
vThe execution key in which your PLTprograms are invoked
vThe storage key of data storage obtained for your PLTprograms.

Execution key for PLT programs

CICS always gives control to PLTprograms in CICS key. Even if you specify
EXECKEY(USER) on the program resource definition, CICS forces CICS key when
it passes control to any PLTprograms invoked during initialization or shutdown.

shutdown programs

396 CICS TS for OS/390: CICS Customization Guide