The CHECKPOINT statement writes to a disk file the complete state of the job at a specified point. Using the disk file, the job can later be restarted from this point.
<checkpoint statement>
── CHECKPOINT ── ( ──<device>── , ──<disposition>── ) ─────────────────┤
<device>
──┬─ DISK ─────┬───────────────────────────────────────────────────────┤ ├─ DISKPACK ─┤ └─ PACK ─────┘
The checkpoint/restart facility can protect a program against the disruptive effects of unexpected interruptions during the program's execution. If a halt/load or other system interruption occurs, a job is restarted either before the initiation of the task that was interrupted or, if the operator permits, at the last checkpoint, whichever is more recent. Checkpoint information can also be retained after successful runs to permit restarting jobs to correct bad data situations.
The <device> specification determines the family name of the checkpoint file. If the device is DISK, the family name is DISK. If the device is PACK or DISKPACK, the family name is PACK.
The CHECKPOINT statement can be used as a Boolean function. An attempted checkpoint returns a value with the following information:
[ 0: 1] = Exception bit [10:10] = Completion code [25:12] = Checkpoint number [46: 1] = Restart flag (1 = restart)
In response to the request for a completion code, a program can receive a variety of messages. See Restarting a Job for a list of the completion codes and messages.

