COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
AREA or SAME MERGE AREA clauses, then all of the files named in that SAME AREA clause
must also be named in each of the affected SAME SORT AREA or SAME MERGE AREA clauses.
This clause specifies that storage be shared:
◦ The SAME SORT AREA and SAME MERGE AREA clauses advise the compiler that the
same memory area can be used in sorting or merging each sort or merge file named and
that any memory area used for sorting or merging a sort-merge file can be reused in
sorting or merging any other sort-merge files. The compiler ignores the advice provided
by this clause.
◦ Storage areas assigned to files that do not represent sort or merge files can be allocated
as needed for sorting or merging the sort-merge files named in the SAME SORT AREA or
SAME MERGE AREA clause.
◦ Files other than sort-merge files do not share the same storage area with each other. If
you want these files to share the same storage area, you must also include a SAME AREA
or SAME RECORD AREA clause naming the files.
◦ During the execution of a SORT or MERGE statement referring to a sort or merge file
named in this clause, any file named in this clause that is not a sort or merge file must
not be open.
• SAME RECORD AREA Clause
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 a logical record of each opened
output file whose file name appears in this SAME RECORD AREA clause. This is equivalent
to implicit redefinition of the area—records are aligned on the leftmost character position.
A file name must not appear in more than one SAME RECORD AREA clause.
MULTIPLE FILE Clause
NOTE: The 1985 COBOL standard classifies the MULTIPLE FILE clause as obsolete, so you are
advised not to use it.
tape-file
is the file name of a file on the tape that the program uses. Regardless of the number of files
on a single reel, only files that the program uses need to be defined; however, if any file in
the set is not listed, or if the files are not listed in the order they occur on the tape, then each
file’s position relative to the beginning of the tape must be specified.
POSITION
is unnecessary when you list all the files on the tape in physical order; otherwise, it is required.
142 Environment Division










