Recovery considerations in conversations
Because a conversation involves several steps and can involve several application programs, consider the following items.
- One way you can make recovery easier is to design the conversation so that all the database updates are done in the last step of the conversation. This way, if the conversation terminates abnormally, IMS can back out all the updates because they were all made during the same step of the conversation. Updating the database during the last step of the conversation is also a good idea, because the input from each step of the conversation is available.
- Although a conversation can terminate abnormally during any step of the conversation, IMS backs out only the database updates and output messages resulting during the last step of the conversation. IMS does not back out database updates or cancel output messages for previous steps, even though some of that processing might be inaccurate as a result of the abnormal termination.
- Certain IMS system service calls can be helpful if the
program determines that some of its processing was invalid. These calls include
ROLB
,SETS
,SETU
, andROLS
. The Roll Back call (ROLB
) backs out all of the changes that the program has made to the database.ROLB
also cancels the output messages that the program has created (except those sent with an express PCB) since the program's last commit point.The
SETS
, orSETU
, andROLS
(with a token) calls work together to allow the application program to set intermediate backout points within the call processing of the program. The application program can set up to nine intermediate backout points. Your program needs to use theSETS
orSETU
call to specify a token for each point. A subsequentROLS
call, using the same token, can back out all database changes and discard all nonexpress messages processed since thatSETS
orSETU
call.Definition: A token is a 4-byte identifier.
- The program can use an express PCB to send a message to the person at the terminal and to the
master terminal operator. When the application program inserts messages using an express PCB, IMS waits until it has the complete message, rather than for the
occurrence of a commit point, to transmit the message to its destination. (In this context,
insert
refers to a situation in which the application program sends the message and it is received by IMS;transmit
refers to a situation in which IMS begins sending the message to its destination.) Therefore, when IMS has the complete message, it will be transmitted even if the program abnormally terminates. Messages sent with an express PCB are sent to their final destinations even if the program terminates abnormally or issues aROLB
call. - To verify the accuracy of the previous processing, and to correct the processing that is
determined to be inaccurate, you can use the Conversational Abnormal termination routine, DFSCONE0.
Related reading: For more information on DFSCONE0, see IMS Version 15.2 Exit Routines.
- You can write an MPP to examine the SPA, send a message notifying the person at the terminal of the abnormal termination, make any necessary database calls, and use a user-written or system-provided exit routine to schedule it.