COBOL Manual for TNS/E Programs (H06.03+)
Data Division
HP COBOL Manual for TNS/E Programs—520347-003
7-44
General Considerations
•
Constraints on Clauses of the Data Description Entry
Each data description entry must begin with the level number. If a data-name or the
keyword FILLER is specified, it must immediately follow the level number. The
characteristics of the data item determine which of the clauses are required or
optional. Clauses that appear can do so in any order. No clause can appear more
than once.
°
Data Name or FILLER Keyword
If the data-name appears, it specifies the name of the data item being
described.
You can give an entry a name so that the name can be used to refer to the
entry. If you do not need to refer to the entry, you can give it the name FILLER,
or omit the name entirely. Such unnamed or FILLER items act as place holders
in records where not all the fields are referred to or as convenient names for
constants, such as in report headings.
When the level number is 01, the data item is a record, and the data-name is
sometimes referred to as a record-name. In this case, the data-name must be
specified if the data description entry contains the EXTERNAL clause or if the
data description entry is associated with a file description entry that contains
the EXTERNAL clause. If neither the data-name nor the keyword FILLER is
specified, it is as if the keyword FILLER had been specified.
When the level number is 77, the data item is an independent (or
noncontiguous) elementary data item, and the data-name (not FILLER) must
always be specified.
°
REDEFINES Clause
The REDEFINES clause, when it appears, must immediately follow the data-
name or FILLER keyword. If it does not, the compiler issues a warning,
because COBOL requires REDEFINES to precede all other clauses.
°
EXTERNAL Clause
The EXTERNAL clause can be specified only for data description entries within
the Working-Storage or Extended-Storage Sections whose level number is 01.
It cannot be specified in a data description entry containing a REDEFINES
clause.
°
PICTURE Clause
The PICTURE clause must be specified for every elementary item except
these, which must not have PICTURE clauses:
°
Indexes (described only in INDEXED phrases)
°
Data items described as USAGE INDEX, USAGE NATIVE-n, or USAGE
POINTER
°
Data items declared by RENAMES clauses










