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

Example 38 Sort-Merge File Description Entry
SD SORT-THIS
RECORD CONTAINS 80 CHARACTERS
DATA RECORD IS SORT-TEMPLATE.
01 SORT-TEMPLATE.
05 CUSTOMER-NAME PIC X(35).
05 FILLER PIC X(35).
05 CUSTOMER-ADDRESS PIC X(55).
05 CUSTOMER-ZIP PIC 9(15).
...
Data Description Entries
Data description entries in the File Section describe record areas associated with files. Each level-01
data description entry is a record description entry that describes the record area for the file named
in the preceding file description entry or sort-merge file description entry. If multiple record
description entries follow an file description or sort-merge file description entry, each record
description entry after the first one is a redefinition of the record area. See Descriptions of Records
(Levels 01-49).
You can use level-66 data description entries to rename contiguous items in a record and level-88
data description entries to assign condition-names to values of record items. See Descriptions That
Rename Items (Level 66) and Descriptions of Condition-Names for Values (Level 88). You cannot
put level-77 data description entries in the File Section.
Working-Storage Section
The Working-Storage Section defines records and miscellaneous data items for the process to use.
You can set the initial values of most data items in working storage. When a process does not
need local data items or explicit intermediate storage to execute the run unit, you can omit the
Working-Storage Section.
01-data-description, 77-data-description
describe data items for the process to use (for details, see Data Description Entries). You can
specify initial values for most of these data items (see Initializing Data Items).
There is no difference between level-77 items and elementary level-01 items, and the latter are
preferred.
There are limits to the number of records and level-77 items that a program can contain. See
Chapter 18: HP COBOL CRE Support (page 709).
66-or-88
is a level-66 or level-88 description. For syntax, see Descriptions That Rename Items (Level 66)
and Descriptions of Condition-Names for Values (Level 88).
Working-Storage Section 175