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 may 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.
The data description entry for the redefined item cannot contain an OCCURS clause. However, the redefined item may 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 may not be subscripted. The original item, the redefined item, and all items subordinate to them cannot contain an OCCURS DEPENDING ON clause.
If the GLOBAL clause is used in the data description entry which contains the REDEFINES clause, only the subject of the clause possesses the global attribute. The EXTERNAL clause must not be specified on the same data description entry as a REDEFINES clause. If the object is GLOBAL or EXTERNAL, the subject does not inherit the attribute.
Data-name-1, the redefining item, may be smaller than data-name-2, the redefined item. It may only be larger than the redefined item if the redefined item is specified with a level-number of 01 and is not declared to be an external data record.
One or more redefinitions of the same storage area are permitted. The entries giving the new descriptions of the storage area must be in the same section, and 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. The redefining entry cannot contain a TYPEDEF clause. The redefining and redefined entries, and any subordinate entries must not contain a TYPE clause.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.