The REDEFINES Clause

General Format


*

Note that level-number and data-name-1

ANS85 or FILLER

are shown in the above format to improve clarity. Level-number, and data-name-1

ANS85 and FILLER

are not part of the REDEFINES clause.

Syntax Rules

  1. The REDEFINES clause, when specified, must immediately follow data-name-1

    ANS85 or FILLER,

    MF or it can follow the PICTURE or USAGE clause

    .

  2. The level-numbers of data-name-1 and data-name-2 must be identical but must not be 66,

    MF 78

    or 88.

  3. This clause must not be used in level 01 entries in the File Section, since multiple level 01 entries subordinate to an FD or SD indicator represent implicit redefinitions of the same areas. (See General Rule 2 in the topic The DATA RECORDS Clause.)

    MF This clause can be used on level 01 entries in the File Section.

  4. OSVSVSC2 The data description for data-name-2 can contain a REDEFINES clause and

    data-name-2 can be subordinate to an entry which contains a REDEFINES clause. Its data description cannot contain an OCCURS clause. However, data-name-2 can be subordinate to an item whose data description entry contains an OCCURS clause. In this case, the reference to data-name-2 in the REDEFINES clause cannot be subscripted or indexed. Neither the original definition nor the redefinition can include an item whose size is variable as defined in the OCCURS clause. (See the topic The OCCURS Clause.)

    OSVSMF The data description for data-name-2 can contain an OCCURS clause.

    MF If the level number is 01, either or both of the original definition and the redefinition can include an item whose size is variable as defined in the OCCURS clause.

  5. No entry having a level-number numerically lower than the level-number of data-name-2 and data-name-1 can occur between the data description entries of data-name-2 and data-name-1.
  6. OSVSVSC2MF An external or internal floating-point data item can be the subject or object of a REDEFINES clause.
  7. ANS85 Data-name-2 must not be qualified even if it is not unique since no ambiguity of reference exists in this case because of the required placement of the REDEFINES clause .

    OSVS Data-name-2 may be qualified but any qualification specified is ignored.

  8. The entries giving the new description of the character positions must not contain any VALUE clauses except in condition-name entries.
  9. ISO2002 The REDEFINES clause must not be specified for a data item of class object.

    MF The REDEFINES clause may be specified for a data item of class object.

  10. ISO2002 Data-name-2 must not be of class object.

    MF Data-name-2 may be of class object.

  11. ISO2002MF  Data-name-2 must not be described with the ANY LENGTH clause.

General Rules

  1. Redefinition starts at data-name-2 and ends when a level-number less than or equal to that of data-name-2 is encountered.
  2. When the level-number of data-name-1 is other than 01, it must specify the same number of character positions that the data item referenced by data-name-2 contains

    ANS85OSVS except that the data-name-1 area can be either smaller than the data-name-2 area

    MF or be larger than the data-name-2 area. In this case, extra storage is reserved to provide sufficient storage for the number of character positions in the largest of the redefining or redefined items.

    It is important to observe that the REDEFINES clause specifies the redefinition of a storage area, not of the data items occupying the area.

  3. Multiple redefinitions of the same character positions are permitted. The entries giving the new descriptions of the character positions must follow the entries defining the area being redefined, without intervening entries that define new character positions. Multiple redefinitions of the same character positions must all use the data-name of the entry that originally defined the area

    OSVSVSC2MF or the data-name of any other preceding redefinition of that entry

    .

  4. Multiple level 01 entries subordinate to any given level indicator (FD or SD) represent implicit redefinitions of the same area.