Transaction restart
The transaction restart user-replaceable module (DFHREST) enables you to participate in the decision as to whether a transaction should be restarted or not.
The default program requests restart under certain conditions. For example, if a program isolation deadlock occurs (for example, when two tasks each wait for the other to release a particular DL/I database segment), one task is backed out and automatically restarted, and the other task is allowed to complete its update.
- CICS® invokes DFHREST only when RESTART(YES) is specified in a transaction's resource definition.
- Ensure that resources used by restartable transactions, such as files, temporary storage, and intrapartition transient data queues, are defined as recoverable.
- When transaction restart occurs, a new task is attached that invokes the initial program of the transaction. This is true even if the task ended abnormally in the second or subsequent unit of work, and DFHREST requested a restart.
- CICS keeps statistics on the total number of restarts against each transaction.
- Emergency restart does not restart any user tasks that were in flight when CICS abnormally terminated. Instead, recovery manager attaches a special task for each inflight task that had recovery records in the system log at abnormal termination. This task invokes each resource manager to backout recoverable resources.
- Making a transaction restartable can involve slightly more overhead,
because copies of the TCTUA, COMMAREA, and terminal input/output area
(TIOA) have to be kept in case the transaction needs to be restarted.
Channels are not recoverable. If transactions with channels are restarted, the transactions cannot access the original channels. Distributed transactions with large channels (more than approximately 30KB) are not restartable.
For more information about making transactions restartable, see Writing a transaction restart program.
- In some cases, the benefits of transaction restart can be obtained instead by using the SYNCPOINT ROLLBACK command. See The SYNCPOINT ROLLBACK command for information about using this command in an MRO environment.
- A transaction initiated by terminal input is allowed to restart during shutdown, even if the transaction is defined as SHUTDOWN(DISABLED).
- Asynchronous child tasks created by an EXEC CICS RUN TRANSID ASYNCHRONOUS command are not eligible for transaction restart. DFHREST will not be called for this type of task.