Restarting your program
If you issue symbolic checkpoint calls (for batch and BMP programs), you can use the
Extended Restart system service request (XRST
) to restart your program after an
abnormal termination.
The XRST
call restores the program's data areas to the way they were
when the program terminated abnormally, and it restarts the program from the last checkpoint request
the program issued before terminating abnormally.
If you use basic checkpoint calls (for batch and BMP programs), you must provide the necessary code to restart the program from the latest checkpoint in the event that it terminates abnormally.
One way to restart the program from the latest checkpoint is to store repositioning data in an
HDAM database. Your program writes a database record containing repositioning information to the
HDAM database. It updates this record at intervals. When the program terminates, the database record
is deleted. At the completion of the XRST
call, the I/O area always contains a
checkpoint ID used by the restart. Normally, XRST
will return the 8-byte symbolic
checkpoint ID, followed by 4 blanks. If the 8-byte ID consists of all blanks, then
XRST
will return the 14-byte time-stamp ID. Also, check the status code in the PCB.
The only successful status code for an XRST
call is a row of blanks.