The RENAMES Clause

The RENAMES clause permits alternative, possibly overlapping, groupings of elementary items.

General Format

Syntax for General Format for the RENAMES clause

Level-number 66 and data-name-1 are shown in the above format to improve clarity. Level-number and data-name-1 are not part of the RENAMES clause.

Syntax Rules

  1. Any number of RENAMES entries can be written for a logical record.
  2. All RENAMES entries referring to data items within a given logical record must immediately follow the last data description entry of the associated record description entry.
  3. Data-name-2 and data-name-3 must be names of elementary items or groups of elementary items in the same logical record, and cannot be the same data-name. A 66 level entry cannot rename another 66 level entry, nor can it rename a 77,

    MF 78,

    88, or 01 entry.

    MF A 66 level entry may rename another 66 level entry or a level 77 or level 01 entry.

  4. Data-name-1 cannot be used as a qualifier, and can be qualified only by the names of the associated level 01, FD or SD entries. Neither data-name-2 nor data-name-3 can have an OCCURS clause in its data description entry, nor be subordinate to an item that has an OCCURS clause in its data description entry. (See the topic The OCCURS Clause.)
  5. The beginning of the area described by data-name-3 must not be to the left of the beginning of the area described by data-name-2. The end of the area described by data-name-3 must be to the right of the end of the area described by data-name-2. Data-name-3, therefore, cannot be subordinate to data-name-2.
  6. Data-name-2 and data-name-3 can be qualified.
  7. The words THRU and THROUGH are equivalent.
  8. None of the items within the range, including data-name-2 and data-name-3, if specified, can be an item whose size is variable as defined in the topic The OCCURS Clause.

General Rules

  1. When data-name-3 is specified, data-name-1 is a group item which includes all elementary items starting with data-name-2 (if data-name-2 is an elementary item) or the first elementary item in data-name-2 (if data-name-2 is a group item), and concluding with data-name-3 (if data-name-3 is an elementary item) or the last elementary item in data-name-3 (if data-name-3 is a group item).
  2. When data-name-3 is not specified, all of the attributes of data-name-2 become the data attributes for data-name-1.
  3. OSVS When data-name-2 and data-name-3 are not explicitly qualified and when no ambiguity of reference exists, implied qualification of the 01 level item is used.