COBOL Manual for TNS and TNS/R Programs

Data Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
7-34
Data Description Entries
Data Description Entries
The data description entries for unrelated items (level-77 items) or records or both
follow the Working-Storage Section header. Record-names, level-77 item names, and
subordinate data-names are not required to be unique within the program except in
these cases:
A data-name that is referenced in the program and cannot be uniquely designated
by including qualifying names in the reference cannot be uniquely designated by
including qualifying names in the reference (the reference is diagnosed, not the
data-name)
A data-name for a language element whose syntax mandates uniqueness; for
example, the level-01 names of external data items
If data items have hierarchical relationships to one another, you must group them into
records according to the rules for record descriptions. All clauses available for record
descriptions in the File Section are available for record descriptions in the Working-
Storage Section. See Descriptions of Records (Levels 01-49).
If elementary data items bear no relationship to any other items, you do not need to
group them into records. You can define each as a noncontiguous item with level
number 77, followed by a data-name and a PICTURE or USAGE clause. Other data
description clauses are optional for noncontiguous items; you can use other clauses to
complete an item’s description when necessary.
You do not have to put level-01 items (records) and level-77 items in any special order
in the Working-Storage Section; however, if you are planning working storage for a
program to be run as a process pair, see Checkpointing for a recommended approach
that simplifies checkpointing.
You can also use level-66 data description entries to rename contiguous items in a
record (see Descriptions That Rename Items (Level 66)) and level-88 data description
entries to assign condition-names to values of items (see Descriptions of Condition-
Names for Values (Level 88)).