COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

rules apply to these record description entries as well as those defined in the Working-Storage
Section and Extended-Storage Section.
Example 4: Programs With Shared Data (page 54) contains an example of the use of the
EXTERNAL clause.
GLOBAL Clause
The GLOBAL clause specifies that a data-name is a global name. A global name is available to
every program contained within the program that describes it, even though the contained programs
do not contain a description of it.
Usage Considerations:
Global Name Can be Used in Contained Programs
A statement in a program contained directly or indirectly within a program that describes a
global name can reference that name without describing it again.
Only for Level-01 Items
The GLOBAL clause can be specified only in data description entries whose level number is
01 in the File Section, Working-Storage Section, or Extended-Storage Section.
Name Uniqueness Within a Single Program
In the Data Division of any one program, the data description entries for any two data items
for which the same data-name is specified must not include the GLOBAL clause.
Not With SAME RECORD AREA Clause
If the SAME RECORD AREA clause is specified for several files, the record description entries
or the file description entries for these files must not include the GLOBAL clause.
Global Attribute is Inherited
A data-name described using a GLOBAL clause is a global name. All data-names subordinate
to a global name are global names. All condition-names associated with a global name are
global names.
Use With REDEFINES Clause
If the GLOBAL clause is used in a data description entry that contains the REDEFINES clause,
the global attribute applies only to the subject of the REDEFINES clause.
Example 4: Programs With Shared Data (page 54) contains an example of the use of the
GLOBAL clause.
PICTURE Clause
The PICTURE clause defines the characteristics and editing requirements of an elementary item.
character-string
is one or more symbols that determine the category of an elementary item, restrict the values
that you can assign to the item, and define editing operations.
Descriptions of Records (Levels 01-49) 191