z/OS DFSMSdfp Checkpoint/Restart
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Canceling a Checkpoint

z/OS DFSMSdfp Checkpoint/Restart
SC23-6862-00

Under the following conditions, you may not wish to have a job automatically restarted in case of failure.
  • If you have not yet taken a checkpoint and the job has already been restarted.
  • If you are updating critical data that must be complete and accurate before an automatic restart can be successful.

In these cases, you can take a checkpoint, but avoid automatic restart, by using the CANCEL option on the CHKPT macro. If CHKPT CANCEL is used after a checkpoint is taken, the job is not automatically restarted after failure. For the format of the CHKPT macro see Coding the CHKPT Macro Instruction.

After being restarted, the job step may again terminate abnormally. If the job terminates abnormally, it may be restarted from the same checkpoint, subject to operator authorization. To avoid restarting the job step twice from the same checkpoint, code the sequence shown in Figure 1.

Figure 1. Canceling a Request for Automatic Restart
         .
         .
         .
         CHKPT     CHKPTDCB  Establish checkpoint
         CH        15,=H'4'  Is restart in progress
         BNE       NRESTART  No, branch to NRESTART
         CHKPT     CANCEL    Yes, cancel restart request
NRESTART
         .
         .
         .

After the successful completion of a restart from a checkpoint, the system places a return code of X'04' in register 15 and returns control to your program at the instruction following the CHKPT macro instruction. At this time, a request for another automatic restart at the same checkpoint is normally in effect. In Figure 1, the instruction that follows the CHKPT macro instruction tests the return code to determine whether control has been returned as the result of a restart. If the return code is X'04', a restart has just occurred, and a second CHKPT macro instruction is executed. This macro instruction has a CANCEL operand, which cancels the existing request for an automatic restart. If the job step again terminates abnormally after a restart from the checkpoint, automatic restart can occur only at the beginning of the step. It will not occur at the checkpoint preceding the canceled checkpoint.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014