COBOL Manual for TNS and TNS/R Programs

Environment Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
6-60
I-O-CONTROL Paragraph
SAME AREA Clause for I-O Files
The SAME AREA clause advises the compiler that two or more files that are not sort-
merge files can use the same memory area during processing. Only one of these files
can be open at any given time.
RECORD
specifies that two or more files are to use the same memory area for processing
the current logical record.
same-file
is the sd-name in the sort-merge file description entry or the fd-name in the file
description entry for the file.
The compiler ignores the advice provided by the SAME AREA clause. For information
on one way files can share memory, see the HP COBOL Fast I-O (Local Buffering).
The SAME RECORD AREA clause specifies that two or more files use the same
memory area for processing the current logical record. Ordinarily, all the files can be
open at the same time, but see the restrictions on the usage of SAME clauses.
A logical record in the SAME RECORD AREA is considered 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 a redefinition of the area—records are aligned on
the leftmost character position.
AREARECORD FOR
SAME
same-file
VST062.vsd