Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Language Reference


RENAMES clause

The RENAMES clause specifies alternative and possibly overlapping groupings of elementary data items.

Read syntax diagramSkip visual syntax diagram
Format

>>-66--data-name-1--RENAMES--data-name-2------------------------>

>--+--------------------------+--------------------------------><
   '-+-THROUGH-+--data-name-3-'   
     '-THRU----'                  

The special level-number 66 must be specified for data description entries that contain the RENAMES clause. (Level-number 66 and data-name-1 are not part of the RENAMES clause, and are included in the format only for clarity.)

One or more RENAMES entries can be written for a logical record. All RENAMES entries associated with one logical record must immediately follow that record's last data description entry.

data-name-1
Identifies an alternative grouping of data items.

A level-66 entry cannot rename a level-01, level-77, level-88, or another level-66 entry.

data-name-1 cannot be used as a qualifier; it can be qualified only by the names of level indicator entries or level-01 entries.

data-name-2, data-name-3
Identify the original grouping of elementary data items; that is, they must name elementary or group items within the associated level-01 entry and must not be the same data-name. Both data-names can be qualified.

data-name-2 and data-name-3 can each reference any of the following:

  • An elementary data item
  • An alphanumeric group item
  • A national group item

When data-name-2 or data-name-3 references a national group item, the referenced item is processed as a group (not as an elementary data item of category national).

The OCCURS clause must not be specified in the data entries for data-name-2 and data-name-3, or for any group entry to which they are subordinate. In addition, the OCCURS DEPENDING clause must not be specified for any item defined between data-name-2 and data-name-3.

The keywords THROUGH and THRU are equivalent.

When the THROUGH phrase is specified:

Usage note: The group defined with the THROUGH phrase can include data items of usage NATIONAL.

The leftmost character position in data-name-3 must not precede the leftmost character position in data-name-2, and the rightmost character position in data-name-3 must not precede the rightmost character position in data-name-2. This means that data-name-3 cannot be totally subordinate to data-name-2.

When the THROUGH phrase is not specified:

The following figure illustrates valid and invalid RENAMES clause specifications.

This figure shows RENAMES clause specifications and their storage layouts, based on a set of data description entries.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)