Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)

Data Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual426750-001
5-7
Data Description Entry
Format 1 describes data of levels 01 through 49 and level 77. The data-name-1
entry is the name of the storage area defined by the subordinate items. In the
following example, store-address refers to everything from street through zip-code.
01 sample-record.
05 store-id.
10 store-number PIC 999.
10 store-region PIC X.
05 store-manager PIC X(35).
05 store-address.
10 street PIC X(25).
10 city PIC X(15).
10 state PIC X(2).
10 zip-code PIC 9(5).
05 FILLER PIC X(14).
The FILLER keyword takes the place of a data name when it is unimportant to name
an item. FILLER is commonly used when building Working-Storage records, such
as error messages, where most of the text is groups of constants. The text groups
can be separated by the filler. In the following example, FILLER defines an area in
storage that cannot be referred to in the program except as part of the enclosing item,
first-record:
01 first-record.
05 record-code PIC 99.
05 record-type PIC XX.
05 FILLER PIC X(30).
05 division-code PIC 999.
A level 77 entry cannot itself be subdivided. Level 77 entries, like level entries 01
through 49, must be immediately followed by a data name or keyword FILLER. For
example:
01 first-record.
05 record-code PIC 99.
05 record-type PIC XX.
77 temp-1 PIC X(4).
77 temp-2 PIC X(3).
Various examples of level 77 items appear in Section 6.
Format 2 describes a level 66 entry, which renames one or more contiguous
elementary items. In the following example, the group card-codes is renamed code:
05 card-codes.
10 store-code PIC 9.
10 state-code PIC 9(4).
66 code RENAMES card-codes.
Format 3 describes a level 88 entry, which assigns condition name values. In the
following example, item tax-code is defined with a range of values:
05 tax-code PIC 99.
88 tax-range VALUES ARE 01 THRU 20.