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-15
RENAMES Clause
The RENAMES clause merely renames a group of existing data items and does not
redescribe any of their characteristics; therefore, no other clauses can be used. One or
more RENAMES entries can be written for a structure; these entries can occur in any
order, but must immediately follow the last data description entry of the structure.
When the THROUGH option is not specified, new-name merely renames old-name.
new-name is a group item only if old-name is a group item.
When the THROUGH option is specified, the following rules apply:
old-name and end-name must be data areas within the same structure.
old-name and end-name cannot have the same names, but the names can be
qualified.
old-name and end-name cannot be the names of data entries with level number
01, 77, 66, or 88.
old-name and end-name cannot be described by an OCCURS clause in their
definitions, and they cannot be subordinate to an item described by an OCCURS
clause.
end-name cannot name an item that occupies character positions preceding the
beginning of the area described by old-name.
end-name cannot name an item that is subordinate to old-name.
Items within the renamed area cannot be described by an OCCURS clause.
When the THROUGH option is specified, new-name is a group item that includes all
elementary items within the bounds established by old-name and end-name. The
following defines the beginning and end of the group:
If old-name is an elementary item, the new group item begins with old-name.
If old-name is a group item, the new group item begins with the first elementary
item of old-name.
If end-name is an elementary item, the new group item ends with end-name.
If end-name is a group item, the new group item ends with the last elementary
item of end-name.
The following example illustrates the RENAMES clause:
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.