Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

5.3.12 REDEFINES Clause

The REDEFINES clause allows you to use different data description entries to describe the same computer storage area.

    ___ Format _____________________________________________________________ 
   |                                                                        |
   | >>__level-number__ _____________ __REDEFINES__data-name-2___________>< |
   |                   |_data-name-1_|                                      |
   |                   |_FILLER______|                                      |
   |                                                                        |
Note: Level-number, data-name-1, and FILLER are not part of the REDEFINES clause itself, and are included in the format only for clarity.

When specified, the REDEFINES clause must be the first entry following data-name-1 or FILLER. If data-name-1 or FILLER is not specified, the REDEFINES clause must be the first entry following the level-number.

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

data-name-1, FILLER
Identifies an alternate description for the same area, and is the redefining item or the REDEFINES subject.

Is the redefined item or the REDEFINES object.

When more that one level-01 entry is written subordinate to an FD entry, a condition known as implicit redefinition occurs. That is, the second level-01 entry implicitly redefines the storage allotted for the first entry. In such level-01 entries, the REDEFINES clause must not be specified.

Redefinition begins at data-name-1 and ends when a level-number less than or equal to that of data-name-1 is encountered. No entry having a level-number numerically lower than those of data-name-1 and data-name-2 can occur between these entries. For example:

     05    A PICTURE X(6).
     05    B REDEFINES A.
       10 B-1                      PICTURE X(2).
       10 B-2                      PICTURE 9(4).
     05   C                        PICTURE 99V99.

In this example, A is the redefined item, and B is the redefining item. Redefinition begins with B and includes the two subordinate items B-1 and B-2. Redefinition ends when the level-05 item C is encountered.

X The data description entry for data-name-2, the redefined item, can
X contain a REDEFINES clause.

The data description entry for the redefined item cannot contain an OCCURS clause. However, the redefined item can be subordinate to an item whose data description entry contains an OCCURS clause. In this case, the reference to the redefined item in the REDEFINES clause must not be subscripted. Neither the redefined item nor the redefining item, or any items subordinate to them, can contain an OCCURS DEPENDING ON clause.

If the GLOBAL clause is used in the data description entry which contains the REDEFINES clause, it is only the subject of that REDEFINES clause that possesses the global attribute.

The EXTERNAL clause must not be specified on the same data description entry as a REDEFINES clause.

If the data item referenced by data-name-2 is either declared to be an external data record or is specified with a level-number other than 01, the number of character positions it contains must be greater than or equal to the number of character positions in the data item referenced by the subject of this entry. If the data-name referenced by data-name-2 is specified with a level-number of 01 and is not declared to be an external data record, there is no such constraint.

X When the data item implicitly redefines multiple 01-level records in a
X file description (FD) entry, items subordinate to the redefining or
X redefined item can contain an OCCURS DEPENDING ON clause.

One or more redefinitions of the same storage area are permitted. The entries giving the new descriptions of the storage area must immediately follow the description of the redefined area without intervening entries that define new character positions. Multiple redefinitions must all use the data-name of the original entry that defined this storage area. For example:

     05    A                       PICTURE 9999.
     05    B REDEFINES A           PICTURE 9V999.
     05    C REDEFINES A           PICTURE 99V99.

The redefining entry (identified by data-name-1), and any subordinate entries, must not contain any VALUE clauses.

X USAGE IS OBJECT REFERENCE can be the subject or object of a REDEFINES
X clause.

X An external or internal floating-point item can be the subject or object
X of a REDEFINES clause.


Previous Topic Next Topic Copyright IBM Corp. 1991, 1998

IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.

Return to library:   z/OS | z/OS.e | TPF | z/VSE | z/VM | IBM Hardware | IBM System z Redbooks
Glossary:   IBM terminology
Publications:   How to order publications
Readers:   Download IBM Library Reader | Download IBM Softcopy Reader | Download Adobe® Acrobat® Reader®
Library management:   Download IBM Softcopy Librarian
Contacts:   Contact z/OS

Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.