The I-O-CONTROL paragraph of the input-output section specifies when checkpoints are to be taken and the storage areas to be shared by different files. This paragraph is optional in a COBOL program.
The keyword I-O-CONTROL can appear only once, at the beginning of the paragraph. The word I-O-CONTROL must begin in Area A and must be followed by a separator period.
The order in which I-O-CONTROL paragraph clauses are written is not significant. The I-O-CONTROL paragraph ends with a separator period.
Format: QSAM-i-o-control-entry >>-+-RERUN--+----+--+-assignment-name-1-+--+-------+--| phrase 1 |-----------------------+->< | '-ON-' '-file-name-1-------' '-EVERY-' | +-SAME--+--------+--+------+--+-----+--file-name-3--+-----------------+---------------+ | '-RECORD-' '-AREA-' '-FOR-' | .-------------. | | | | V | | | | '---file-name-4-+-' | | .--------------------------------------. | | (1) V | | +-MULTIPLE FILE------+------+--+----------+----file-name-5--+---------------------+-+-+ | '-TAPE-' '-CONTAINS-' '-POSITION--integer-2-' | | .-------------. | | (1) V | | '-APPLY WRITE-ONLY------+----+----file-name-2-+---------------------------------------' '-ON-' phrase 1 |--+-integer-1--RECORDS----+--+----+--file-name-1---------------| '-END--+----+--+-REEL-+-' '-OF-' '-OF-' '-UNIT-'
Format: VSAM-i-o-control-entry >>-+-RERUN--+----+--+-assignment-name-1-+--+-------+--| phrase 1 |---------+->< | '-ON-' '-file-name-1-------' '-EVERY-' | '-SAME--+--------+--+------+--+-----+--file-name-3--+-----------------+-' '-RECORD-' '-AREA-' '-FOR-' | .-------------. | | V | | '---file-name-4-+-' phrase 1 |--integer-1--RECORDS--+----+--file-name-1----------------------| '-OF-'
Format: line-sequential-i-o-control-entry .-------------. V | >>---SAME--+--------+--+------+--+-----+--file-name-3----file-name-4-+--->< '-RECORD-' '-AREA-' '-FOR-'
Format: sort/merge-i-o-control-entry >>-+----------------------------------+-------------------------> '-RERUN--+----+--assignment-name-1-' '-ON-' .-------------------------------------------------------. V | >----SAME--+-RECORD-----+--+------+--+-----+--| phrase 1 |-+--->< +-SORT-------+ '-AREA-' '-FOR-' '-SORT-MERGE-' phrase 1 |--file-name-3--+---------------------+-------------------------| | .-----------------. | | V | | '---+-------------+-+-' '-file-name-4-'