Module 13: CICS Recovery, Restart and Production Support
Dynamic Backout
Dynamic backout undoes the changes of a single failed task while CICS keeps running. It is the everyday recovery mechanism - most task abends are cleaned up this way with no operator action.
What dynamic transaction backout does
- When a task abends, CICS automatically backs out all changes the task made to recoverable resources in its current unit of work.
- The rest of the region is unaffected - other users keep working while the failed task's updates disappear.
- This is called dynamic transaction backout (DTB) because it happens dynamically, without restarting anything.
- DTB also runs when a task is purged (for example by CEMT SET TASK PURGE) or when the program issues SYNCPOINT ROLLBACK.
Limits of dynamic backout
- Only recoverable resources are backed out. Updates to non-recoverable files, unprotected TS queues and terminal output stay as they are.
- Records added to a VSAM ESDS during the unit of work cannot be physically removed by backout - they are marked as deleted instead.
- If backout itself fails, the unit of work is marked BACKOUTFAILED and the record must be repaired manually.
- Backout uses the journal, so if journaling was not active for the resource, backout is impossible.
Forcing a backout from the program
- A program can deliberately undo its unit of work with SYNCPOINT ROLLBACK, typically in an error paragraph:-9000-ERROR-EXIT.
EXEC CICS
SYNCPOINT ROLLBACK
END-EXEC.
MOVE 'Update failed - no changes were saved.' TO MSGO.
EXEC CICS
SEND MAP('ERRMAP') MAPSET('ERRSET') ERASE
END-EXEC.
EXEC CICS RETURN END-EXEC. - After ROLLBACK the program can continue with a new unit of work, retry the operation, or end the task.
- Use this pattern when validation fails after some updates have already been written.
