GLOBAL Clause

The GLOBAL clause specifies that the file connector named by a file-name is a global name.

Read syntax diagramSkip visual syntax diagram
GLOBAL Clause - Format

>>-+----+--GLOBAL----------------------------------------------><
   '-IS-'           

A global file-name is available to the program that declares it and to every program that is contained directly or indirectly in that program.

A file-name is global if the GLOBAL clause is specified in the file description entry for that file-name. A record-name is global if the GLOBAL clause is specified in the record description entry by which the record-name is declared or, in the case of record description entries in the File Section, if the GLOBAL clause is specified in the file description entry for the file-name associated with the record description entry. Such record description entries may describe a type-name.

The GLOBAL clause can be specified in the same data description entry as the TYPEDEF clause. The scope of the clause applies to the type-name only, and not to any data items which are defined using a global type-name with a TYPE clause.