Restart


The IMS restart call allows the application program which has not completed the task to start again from beginning at the last checkpoint. This is especially useful in long-running application programs.

The Extended Restart (XRST) call is used to restart application program. If the symbolic Checkpoint calls in program, precede it with an XRST call that specifies checkpoint data of blanks.

re>CALL ‘CBLTDLI’ USING WS-XRST
		i/o pcb/aib
		i/o area length
		i/o area

DB PCB:


  • Database Program Control Block.
  • Specifies the DB PCB for the XRST call.
  • DB PCB will act as an input and output parameter.

AIB:


  • Known as Application Interface Block.
  • Specifies the AIB for the call.
  • AIB parameter is an input and output parameter.
  • If AIB using in the XRST call, all the below fields must be initialized in the AIB - AIBID, AIBLEN, AIBRSNM1, AIBOALEN.

AREA:


  • Known as Input-Output Area.
  • Specifies the I/O area in XRST Call.
  • I/O Area parameter is an output parameter.
  • If Get Next calls completed successfully, IMS returns the requested segment in I/O area.
  • If any path calls issued from the application program, the I/O area must be long enough to hold the longest path of concatenated segments.
  • I/O area always contains left-justified segment data.
  • The I/O area points to the first byte of this area.

The XRST call must be issued only once. The XRST should be issued early in the execution of the application program. It does not need to be the first call in the application program.

The XRST must precede any CHKP call. Database calls issued before the XRST call are not within the scope of a restart. The XRST call attempts to reposition all databases to the position of the last checkpoint was taken.

This is done by including each PCB and PCB key feedback area in the checkpoint record. Issuing XRST causes the key feedback area from the PCB in the checkpoint record to be moved to the corresponding PCB in the PSB that is being restarted.

Then IMS issues a GU call, qualified with the concatenated key, for each PCB that held a position when the checkpoint was taken. The below actions will take place when the restart triggered:

  • IMS retrieves the checkpoint ID from the designated field in the application program.
  • IMS repositions all databases to the last check point.
  • IMS refreshes the application programs checkpoint areas.
CALL ‘CBLTDLI’ USING WS-XRST
		IO-PCB
		IO-AREA-LEN(length of largest db io-area)
		XRST-AREA (12 digit checkpoint area, initialized to spaces)
		WS-LENGTH-n (length of ws area)
		WS-AREA-n (ws area to be saved)

The WS length and areas must match the checkpoint WS length and areas.

Note! In IMS V5, the IO-AREA-LEN is no longer needed.