COBOL Manual for TNS and TNS/R Programs
Data Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
7-91
Descriptions That Rename Items (Level 66)
Descriptions That Rename Items (Level 66)
The RENAMES clause assigns a new data-name to an item or to two or more
contiguous items in a record. RENAMES does not cause allocation of storage. You can
put level-66 items in any section of the Data Division.
new-name
is the alias for an elementary item or a data structure.
old-name
is either the name of a data structure or the name of the first of several items to be
given an alias. It can be qualified.
end-name
is the last group name or last item name included in the alias name. It can be
qualified.
The level-66 data description entry in Example 7-21 renames several items in a record
so that you can refer to the items by one name.
Usage Considerations:
•
RENAMES Stands Alone
Because RENAMES merely renames a group of existing data items and does not
redescribe any of their characteristics, no other clauses can be used with it. One or
more RENAMES entries can be written for a logical record. They can occur in any
order but must immediately follow all other data description entries for the record.
Example 7-21. Level-66 Data Description Entry
05 CARD-CODES.
10 STORE-CODE PIC 9.
10 STATE-CODE PIC 9(4).
05 ACCOUNT-NUMBER PIC 9(6).
05 CHECK-DIGIT PIC 9.
66 CARD-NUMBER RENAMES CARD-CODES THRU CHECK-DIGIT.
.
THRU
66
THROUGH
RENAMES
end-name
old-namenew-name
VST109.vsd