Actions of the default program, DFHCESD
The default shutdown assist program, DFHCESD, attempts to purge and backout long-running tasks. It ensures that as many tasks as possible commit or backout cleanly, enabling CICS® to shut down in a controlled manner.
- Normal purge is issued for all remaining tasks.
- z/OS® Communications Server is force closed, IRC and TCP/IP are closed immediately.
- CICS is shut down using PERFORM SHUT IMMEDIATE. (Note that this step does not cause the shutdown assist transaction to run again.)
To check whether tasks are ending sufficiently quickly, DFHCESD samples the number present in the system. It performs a purge operation, and moves on to the next step, only if the number of tasks does not reduce over eight samples (normal shutdown) or four samples (immediate shutdown). After taking a sample, DFHCESD issues a delayed EXEC CICS START request for itself, passing the current sample count in a temporary storage (TS) queue record. The new invocation of DFHCESD also takes a sample, and compares this with the last sample from the TS queue record. It then decides whether to carry out the purge operation and move to the next step, or to remain on the current step.
SDFN Char(2) Step to be performed (00,01,02,03)
SDXN Char(4) Task number of task that started shutdown
SDET Bin(15) Number of samples giving the value in SDNT
SDNT Bin(31) Number of tasks in the system at last sample
On the initial invocation, SDFN is '00', SDXN is set to the task number of the shutdown task, and SDNT and SDET are zero.
Thus, DFHCESD's processing sequence is as follows:
- Initial step 00
- In step 00, if shutdown is NORMAL, DFHCESD puts out a message
and waits for two minutes. It then issues a delayed start of CESD
every two seconds.
- Every two seconds, the number of transactions in the system is sampled.
- If the number is unchanged over four or eight samples (depending on whether this is a normal or immediate shutdown), the first of the purge steps is taken.
- Purge step 01
- The transaction dump data set is closed and task purge is issued
for all remaining transactions, with messages giving details of each
transaction still running and each UOW shunted.
- Every two seconds, the number of transactions in the system is sampled.
- If the number is unchanged over four or eight samples, step 02 is taken.
- Purge step 02
- Unless z/OS Communications
Server persistent sessions support is being used (that is, unless
the persistent session delay interval is set to a value greater than
zero), z/OS Communications
Server is force closed, IRC and TCP/IP are closed immediately.
- Every two seconds, the number of transactions in the system is sampled.
- If the number is unchanged over four or eight samples, step 03 is taken.
- Purge step 03
- CICS is shut down abnormally, with messages giving details of each transaction still running and each UOW shunted.