The I-O-Control Paragraph
The I-O-Control paragraph specifies the points at which rerun is to
be established, the memory area which is to be shared by different files, and
for files with sequential organization the location of files on a multiple file
reel.
The RERUN and MULTIPLE FILE TAPE
clauses of the I-O-Control paragraph are classed as obsolete elements in the
ANSI'85 standard and are scheduled to be deleted from the next full revision of
the ANSI Standard.
All dialects within this COBOL
implementation fully support this syntax. The FLAGSTD Compiler directive can be
used to detect all occurrences of this syntax.
Although they are a part of the
standard COBOL definition, the RERUN and MULTIPLE FILE TAPE clauses are
explicitly excluded from the X/Open COBOL language definitions and should not
be used in a conforming X/Open COBOL source program.
General Format

Syntax Rules
- The I-O-Control paragraph is optional.
- When either the integer-1 RECORDS clause or the integer-2
CLOCK-UNITS clause is specified, character-string must be given in the RERUN
clause.
- In the SAME AREA clause, SORT and SORT-MERGE are equivalent.
- If the SAME SORT AREA or SAME SORT-MERGE AREA clause is used, at
least one of the file-names must represent a sort or merge file. Files that do
not represent sort or merge files can also be named in the clause.
- The two forms of the SAME clause (SAME AREA, SAME RECORD AREA)
are considered separately in the following:
More than one SAME clause can be included in a source element,
subject to the following restrictions:
- A file-name must not appear in more than one SAME AREA
clause.
- A file-name must not appear in more than one SAME RECORD AREA
clause.
- If one or more file-names of a SAME AREA clause appear in a
SAME RECORD AREA clause, all of the file-names in that SAME AREA clause must
appear in the SAME RECORD AREA clause. However, additional file-names not
appearing in that SAME AREA clause can also appear in that SAME RECORD AREA
clause. The rule that only one of the files mentioned in a SAME AREA clause can
be open at any one time takes precedence over the rule that all files mentioned
in a SAME RECORD AREA clause can be open at any one time.
- A file-name that represents a sort or merge file must not
appear in a SAME AREA clause.
- A file-name that represents a sort or merge file must not
appear in more than one SAME SORT AREA or SAME SORT-MERGE AREA clause.
- If a file-name that does not represent a sort or merge file
appears in a SAME AREA clause and one or more SAME SORT AREA or SAME SORT-MERGE
AREA clauses, all of the files named in that SAME AREA clause must be named in
that SAME SORT AREA or SAME SORT-MERGE AREA clause(s).
- The files referenced in the SAME AREA, SAME SORT AREA, SAME
SORT-MERGE AREA, or SAME RECORD AREA clause need not all have the same
organization or access.
Character-string must not be a
reserved word, a literal or a user-name.
- The END OF REEL/UNIT clause can only be used if file-name-2 is a
sequential file.
- More than one RERUN clause can be specified for a given
file-name-2, subject to the following restrictions:
- When multiple integer-1 RECORD clauses are specified, no two
of them can specify the same file-name-2.
- When multiple END OF REEL or END OF UNIT clauses are
specified, no two of them can specify the same file-name-2.
- Only one RERUN clause containing the CLOCK-UNITS clause can be
specified.

Each clause in the
I-O-Control paragraph may optionally be followed by a period.
General Rules
The RERUN clause is documentary
only.
- The SAME AREA clause specifies that two or more files that do not
represent sort or merge files are to use the same memory area during
processing. The area being shared includes all storage areas assigned to the
files specified. It is not, therefore, valid to have more than one of the files
open at the same time. (See Syntax Rule 5c.)
- The SAME RECORD AREA clause specifies that two or more files are
to use the same memory area for processing the current logical record. All of
the files can be open at the same time. A logical record in the SAME RECORD
AREA is considered as a logical record of each opened output file whose
file-name appears in this SAME RECORD AREA clause and of the most recently read
input file whose file-name appears in this SAME RECORD AREA clause. This is
equivalent to an implicit redefinition of the area; that is, records are
aligned on the leftmost character position.
The APPLY clause is documentary
only.
The MULTIPLE FILE clause is
documentary only.
- If the SAME SORT AREA or SAME SORT-MERGE AREA clause is used, at
least one of the file-names must represent a sort or merge file. Files that do
not represent sort or merge files can also be named in the clause. This clause
specifies that storage is shared as follows:
- The SAME SORT AREA or SAME SORT-MERGE AREA clause specifies a
memory area which is made available for use in sorting or merging each sort or
merge file named. Thus any memory area allocated for the sorting or merging of
a sort or merge file is available for reuse in sorting or merging any of the
other sort or merge files.
- In addition, storage areas assigned to files that do not
represent sort or merge files can be allocated as needed for sorting or merging
the sort or merge files named in the SAME SORT AREA or SAME SORT-MERGE AREA
clause.
- Files other than sort or merge files do not share a storage
area. If you wish these files to share a storage area, you must also include in
the source element a SAME AREA or SAME RECORD AREA clause naming these files.
-
During the execution of a SORT or MERGE statement that
refers to a sort or merge file named in this clause, any non-sort-merge files
named in this clause must not be open.