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

compiler issues a diagnostic message if alignment requirements of the elementary item make
this impossible.
BASED Items and the REDEFINES Clause
A redefinition entry cannot contain a BASED clause.
A redefined item can be a BASED item.
EXTERNAL Clause
The EXTERNAL clause specifies that a record data item is external. This item and all of its subordinate
data items are available to every program in the run unit that describes that record.
Usage Considerations:
Working-Storage Section and Extended-Storage Section Records Only
Only data description entries within the Working-Storage Section or Extended-Storage Section
whose level number is 01 can include an EXTERNAL clause. In this case the data-name must
be specified; it cannot be omitted or replaced with the keyword FILLER. Within the same source
program, you cannot define a specific data-name in more than one level-01 entry described
with an EXTERNAL clause.
You cannot specify the EXTERNAL clause in a data description entry that contains the
REDEFINES clause.
Not With VALUE Clause
You must not specify the VALUE clause in any data description entry that includes, or is
subordinate to an entry that includes, the EXTERNAL clause. You can specify the VALUE clause
for condition-name entries associated with the data description entries, however.
Not With BASED Clause
You must not specify the BASED clause in any data description entry that includes the EXTERNAL
clause.
External Record
The EXTERNAL clause specifies that the data item defined by this data description entry is
external. Because this data item is a record data item, it is also referred to as an external
record. All data items defined by subordinate data description entries, including any
redefinitions, are also external.
The data contained in the record identified by the record-name is external and can be accessed
and processed by any program in the run unit that describes and, optionally, redefines it.
Within a run unit, if two or more programs describe the same external data record, then the
associated data description entries (including all subordinate data-names and data items and
their redefinitions) must be identical; however, a program that describes an external record
can contain a data description entry including the REDEFINES clause that redefines the complete
external record, and this complete redefinition need not occur identically in other programs
in the run unit. Also, all descriptions must be in the same section; that is, a description cannot
be in the Extended-Storage Section in one program and in the Working-Storage Section of
another program.
When a file description entry contains the EXTERNAL clause, the data items defined in its
associated record description entries inherit the external attribute; therefore, the preceding
190 Data Division