Writing a transaction restart program

The transaction restart user-replaceable program (DFHREST) enables you to participate in the decision as to whether a transaction should be restarted or not.

CICS® invokes DFHREST when a transaction abends, if RESTART(YES) is specified in the transaction’s resource definition (the default is RESTART(NO)).

The default program requests restart under certain conditions; for example, in the event of a program isolation deadlock (that is, when two tasks each wait for the other to release a particular DL/I database segment or file record), one of the tasks is backed out and automatically restarted, and the other is allowed to complete its update.

For general information about restarting transactions, see the CICS Recovery and Restart Guide.

Notes:
  1. If your transaction restart program chooses to restart a transaction, a new task is attached that invokes the initial program of the transaction. This is true even if the task abended in the second or subsequent UOW, and DFHREST requested a restart.
  2. Statistics on the total number of restarts against each transaction are kept.
  3. Emergency restart does not restart any tasks.
  4. In some cases, the benefits of transaction restart can be obtained instead by using the SYNCPOINT ROLLBACK command. Although use of the ROLLBACK command is not usually recommended, it does keep all the executable code in the application programs.

When planning to replace the default DFHREST, check to see if the logic of any of your transactions is inappropriate for restart.

All the following conditions must be true for CICS to invoke the transaction restart program:

If these conditions are satisfied, CICS invokes the transaction restart program, which then decides whether or not to request that the transaction be restarted. CICS can subsequently override the decision (for example, if dynamic backout fails). Also, if the transaction restart program abends, the transaction is not restarted.

If the above conditions are not satisfied, CICS does not invoke the transaction restart program and the transaction is not restarted.

Related tasks
Rewriting user-replaceable programs
Assembling and link-editing user-replaceable programs
Related reference
The DFHREST communications area
The CICS-supplied transaction restart program
User-replaceable programs and the storage protection facility
[[ Contents Previous Page | Next Page Index ]]