EXTERNAL clause
The EXTERNAL clause specifies that a file connector is external, and permits communication between two programs by the sharing of files.
A file connector is external if the storage associated with that file is associated with the run unit rather than with any particular program within the run unit. An external file can be referenced by any program in the run unit that describes the file. References to an external file from different programs that use separate descriptions of the file are always to the same file. In a run unit, there is only one representative of an external file.
In the FILE SECTION, the EXTERNAL clause can be specified only in file description entries.
The records appearing in the file description entry need not have the same name in corresponding external file description entries. In addition, the number of such records need not be the same in corresponding file description entries.
Use of the EXTERNAL clause does not imply that the associated file-name is a global name. See Sharing data by using the EXTERNAL clause in the COBOL for Linux® on x86 Programming Guide for specific information about the use of the EXTERNAL clause. The TYPEDEF clause cannot be specified in the same data description entry as the EXTERNAL clause; however, the TYPE clause can.