Issuing checkpoints in a batch or BMP program

The two kinds of commands that allow you to make checkpoints are: the CHKP, or Basic Checkpoint command, and the SYMCHKP, or Symbolic Checkpoint command.

Batch programs can use either the Symbolic Checkpoint or the Basic Checkpoint command.

Both checkpoint commands make it possible for you to commit your program's changes to the database and to establish places from which the batch or BMP program can be restarted, in cases of abnormal termination.

Requirement: You must not use the CHKPT=EOV parameter on any DD statement to take an IMS checkpoint.

Because both checkpoint commands cause a loss of database position at the time the command is issued, you must reestablish position with a GU command or other methods.

You cannot reestablish position in the midst of nonunique keys or nonkeyed segments.

Issuing the CHKP command

When you issue a CHKP command, you must provide the code for restarting your program and you must specify the ID for the checkpoint. You can supply either the name of a data area in your program that contains the ID, or you can supply the actual ID, enclosed in single quotation marks. For example, either of the following commands is valid:
EXEC DLI CHKP ID(chkpid);
EXEC DLI CHKP ID('CHKP0007');

Issuing the SYMCHKP command

The SYMCHKP command in batch and BMP programs:
  • Works with the Extended Restart (XRST) command to restart your program if it terminates abnormally.
  • Can save as many as seven program data areas, which are restored when your program is restarted. You can save variables, counters, and status information.

For examples of how to specify the SYMCHKP command, see the topic "SYMCHKP Command" in IMS Version 15.4 Application Programming APIs.