TSO-ISPF JCL COBOL VSAM DB2 CICS IMS-DB IMS-DC Tools Articles Forum Quiz Interview Q&A

IMS Logging & Automatic Backout

IMS Logging and Automatic Back out:

Logging and back outs are two important features of IMS. The logging feature records all database changes made and all messages sent during the execution of a batch or online program.

There are two major differences between IMS batch and online logging. First, the log file (where the changes are recorded), is optional in the batch environment, but required in the online environment. Second, in online logging, two log files are used to record the data base activity -- the primary and the secondary. Both contain identical information for safety. If recording on the primary file becomes impossible (as with a data check on a tape drive). IMS automatically switches logging exclusively to the secondary log file and puts out a warning to the operator that this has occurred. This will give the operator time to correctly shut down IMS online so that new primary and secondary files can be used upon restart.

If an online application program abends during execution, IMS will automatically back out (undo) changes made to all databases and message queues during the execution of the program. It will put them to the last program commit point. (In the batch class, you learned about the checkpoint facility available to an IMS program, which is one way to force a commit point. We will discuss another way to force a commit point in an MPP later in this course.) The back out of changes to the IMS resources is performed using the contents of the log file. This feature ensures the integrity of all the resources used by the abending program.

Be aware that in your system design, IMS will discard the input message being processed when the program abends. When restarted, the MPP is given the next message waiting to be processed. So thought should be given to providing a way of automatically recreating and submitting the message in for processing if program abends.

The following critical system information is recorded on the log data set.

  1. The receipt of an input message in the input queue

  2. The start of an MPP/BMP

  3. The receipt of a message by the MPP for processing

  4. Before and after images of database updates by the MPP/BMP

  5. The insert of a message into the queue by the MPP

  6. The termination of an MPP/BMP

  7. The successful receipt of an output message by the terminal

In addition to the above logging, all previous database record unchanged data is written to a dynamic log. This log information is only used for dynamic back out of a failing MPP/BMP. As soon as the MPP/BMP reaches a synchronization point, the dynamic log information of this program is discarded.

If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on IBMMainframer Community!

Are you looking for Job Change? Job Portal