SAME AREA Clause

The SAME AREA clause specifies that two or more files, that do not represent sort or merge files, are to use the same main storage area during processing. The SAME AREA clause is syntax checked, but is treated as documentation.

Read syntax diagramSkip visual syntax diagram
SAME AREA Clause - Format

                                             .-------------.   
        (1)                                  V             |   
>>-SAME------+------+--+-----+--file-name-3----file-name-4-+---><
             '-AREA-'  '-FOR-'                                 

Notes:
  1. Syntax-checked only.
The files named in a SAME AREA clause need not have the same organization or access.
file-name-3, file-name-4, ...
Must be specified in the FILE-CONTROL paragraph of the same program as the I-O-CONTROL paragraph. They cannot reference an external file connector.