COBOL Manual for TNS/E Programs (H06.03+)

Environment Division
HP COBOL Manual for TNS/E Programs520347-003
6-56
I-O-CONTROL Paragraph
The files mentioned in the SAME AREA or SAME RECORD AREA clause can differ in
organization or access.
SAME AREA Clause for Sort-Merge Files
The SAME AREA clause of the I-O-CONTROL paragraph can also specify sort-merge
files. HP COBOL ignores the advice provided to the compiler by the SAME AREA
clause. The file system automatically allocates and manages all memory areas needed
for file processing and for sort or merge operations.
RECORD
specifies that two or more files are to use the same memory area for processing
the current logical record.
SORT
is ignored by the compiler, but SORT specifies that the compiler can use (and re-
use) the same memory area to sort or merge each sort or merge file specified by
same-file. If SORT is specified, at least one same-file must be a sort file.
MERGE
is equivalent to SORT in the SAME AREA clause. If MERGE is specified, at least
one same-file must be a merge file.
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.
Usage Considerations:
File Organization and Access Modes
The files specified in the SAME AREA clause can have different types of
organization or different access modes.
AREA
RECORD
FOR
SAME
same-file
MERGE
SORT
VST060.vsd