For example, if file input and output errors occur (where the default action is merely to abend the task), you might want to inform the master terminal operator, who can decide to terminate CICS, especially if one of the files is critical to the application.

Your installation might have standards relating to the use of RESP options or HANDLE CONDITION commands. Review these for each new application.

HANDLE ABEND commands

A HANDLE ABEND command can pass control to a routine within a transaction, or to a separately compiled program when the task abends.

The kind of things you might do in abend-handling code include:

vCapturing diagnostic information (in addition to that provided by CICS) before the task abends, and sending messages to the master terminal and end user

vExecuting cleanup actions, such as canceling start requests (if the PROTECT option has not been used)

vWriting journal records to reverse the effects of explicit journaling performed before the abend.

Your installation might have standards relating to the use of HANDLE ABEND commands; review these for each new application.

EXEC CICS SYNCPOINT ROLLBACK command

ROLLBACK might be useful within your transaction if, for instance, the transaction discovers logically inconsistent input after some database updates have been initiated, but before they are committed by the syncpoint.

Before deciding to use it, however, consider the following:

vRollback backs out updates to recoverable resources performed in the current unit of work only and not in the task as a whole.

vThe SYNCPOINT command, with or without the ROLLBACK option, causes a new unit of work to start.

vIf you have a transaction abend, and you do not want the transaction to continue processing, issue an EXEC CICS ABEND and allow dynamic transaction backout to back out the updates and ensure data integrity. Use rollback only if you want the application to regain control after nullifying the effects of a unit of work.

For programming information about the SYNCPOINT command, see the CICS Application Programming Reference.

Dynamic transaction backout

Dynamic transaction backout (DTB) occurs automatically for all transactions that have recoverable resources. It is not an option you can specify on a transaction resource definition. The actions of DTB are described under “Transaction backout” on page 74.

Remember that:

vFor transactions that access a recoverable resource, DTB helps to preserve logical data integrity.

vResources that are to be updated should be made recoverable.

150CICS TS for z/OS 4.1: Recovery and Restart Guide

Page 162
Image 162
IBM SC34-7012-01 manual Handle Abend commands, Exec Cics Syncpoint Rollback command, Dynamic transaction backout