IS EXTERNAL Clause

The IS EXTERNAL clause specifies that the file is shared by more than one program in a run unit.

General Format

IS EXTERNAL

Syntax Rules

  1. The IS EXTERNAL declaration must be made in all the programs that access the file or item externally. The file must be declared external by each program in the run unit that will share a file's current state and record area.
  2. The COBOL name of the file must be the same for all the programs that declare the file.
  3. Each program that declares an external file must describe the file the same way.

General Rules

  1. If one program opens the file, it is open for all programs that declare the same file.
  2. If one program moves the record pointer, the record pointer moves in all the programs that declare the file.
  3. Any data placed in the record area is accessible by all the programs that declare the file.