Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Setting checkpoints

To set checkpoints, use job control statements and use the RERUN clause in the ENVIRONMENT DIVISION. Associate each RERUN clause with a particular COBOL file.

The RERUN clause indicates that a checkpoint record is to be written onto a checkpoint data set whenever a specified number of records in the COBOL file has been processed or when END OF VOLUME is reached. You cannot use the RERUN clause with files that have been defined with the EXTERNAL attribute.

You can write checkpoint records from several COBOL files onto one checkpoint data set, but you must use a separate data set exclusively for checkpoint records. You cannot embed checkpoint records in one of your program data sets.

Restrictions: A checkpoint data set must have sequential organization. You cannot write checkpoints on VSAM data sets or on data sets that are allocated to extended-format QSAM data sets. Also, a checkpoint cannot be taken if any program in the run unit has an extended-format QSAM data set that is open.

Checkpoint records are written on the checkpoint data set defined by a DD statement. In the DD statement, you also choose the checkpoint method:

Single (store single checkpoints)
Only one checkpoint record exists at any given time. After the first checkpoint record is written, any succeeding checkpoint record overlays the previous one.

This method is acceptable for most programs. You save space on the checkpoint data set, and you can restart your program at the latest checkpoint.

Multiple (store multiple contiguous checkpoints)
Checkpoints are recorded and numbered sequentially. Each checkpoint is saved.

Use this method when you want to restart a program at a checkpoint other than the latest one taken.

You must use the multiple checkpoint method for complete compliance to Standard COBOL 85.

Checkpoints during sort operations have the following requirements:


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)