


The RENAMES clause provides an alternate data name for a set of data items.
General Format
66 new-name RENAMES rename-1 [ {THRU } rename-2 ]
{THROUGH}
Syntax Rules
1. The level-number (66) and new-name are not actually part of the RENAMES clause. They are included in the General Format for clarity.
2. New-name is a user-defined word that is the name of the item being described.
3. Rename-1 is the data name of the leftmost data item in the area.
4. Rename-2 is the data name of the rightmost data item in the area.
5. All RENAMES entries referring to data items in a logical record must immediately follow the last data description entry of that record.
6. New-name may not be used as a qualifier.
7. New-name must be unique, because it may not be qualified.
8. Rename-1 and rename-2 must be the names of items in the same logical record.
9. The data description entries for rename-1 and rename-2 may not contain or be subordinate to an OCCURS clause.
10. A level 66 entry may not rename another level 66 entry. Nor can it rename a level 78, 88, level 01, or level 77 entry.
11. None of the items in the range from rename-1 to rename-2 may contain variable occurrence items.
12. The words THRU and THROUGH are equivalent.
13. Rename-2 may not be subordinate to rename-1. The beginning of rename-2 cannot be to the left of the beginning of rename-1. The end of rename-2 must be to the right of the end of rename-1.
General Rules
1. If rename-2 is used, new-name contains all the character positions between the start of rename-1 and the end of rename-2.
2. If rename-2 is used, new-name is treated as a group item. If rename-2 is not used, all the data attributes for rename-1 become attributes of new-name. In this case, you are providing an alternate name for a single data item.