RERUN clause

The RERUN clause specifies that checkpoint records are to be taken. Subject to the restrictions given with each phrase, more than one RERUN clause can be specified.

The RERUN clause is syntax checked, but has no effect on the execution of programs.

Do not use the RERUN clause:

  • For files described with the EXTERNAL clause
  • In programs with the RECURSIVE clause specified
file-name-1
Must be a sequentially organized file.
assignment-name-1
The external file for the checkpoint file. It must not be the same assignment-name as that specified in any ASSIGN clause throughout the entire program, including contained and containing programs.

SORT/MERGE considerations:

When the RERUN clause is specified in the I-O-CONTROL paragraph, checkpoint records are written at logical intervals determined by the sort/merge program during execution of each SORT or MERGE statement in the program. When the RERUN clause is omitted, checkpoint records are not written.

There can be only one SORT/MERGE I-O-CONTROL paragraph in a program, and it cannot be specified in contained programs. It will have a global effect on all SORT and MERGE statements in the program unit.

EVERY integer-1 RECORDS
A checkpoint record is to be written for every integer-1 records in file-name-1 that are processed.

When multiple integer-1 RECORDS phrases are specified, no two of them can specify the same value for file-name-1.

If you specify the integer-1 RECORDS phrase, you must specify assignment-name-1.

EVERY END OF REEL/UNIT
A checkpoint record is to be written whenever end-of-volume for file-name-1 occurs. The terms REEL and UNIT are interchangeable.

When multiple END OF REEL/UNIT phrases are specified, no two of them can specify the same value for file-name-1.

The END OF REEL/UNIT phrase can be specified only if file-name-1 is a sequentially organized file.