Function
The TYPE clause defines that the data description entry is defined by a type description entry.
Format
TYPE TO type-name-1
Syntax rules
Neither a subordinate data description entry nor a condition name may follow a data description entry with TYPE clause.
The current data description entry may not be renamed as a whole or in part using the RENAMES clause.
The current data description entry may not be redefined either implicitly or explicitly either as a whole or in part.
Higher-ranking group items may not contain a SIGN clause, a USAGE clause or GROUP-USAGE clause.
If type-name-1 contains the STRONG phrase, the current data description entry must have either the level number 01 or must be subordinate to a type description entry with the specification STRONG.
If the TYPE clause is specified in a data description entry with the level number 77, type-name-1 must describe an elementary data item.
A data description entry may contain the following clauses in addition to the TYPE clause: BASED, EXTERNAL, GLOBAL, OCCURS and TYPEDEF clauses.
General rules
The TYPE clause defines that the current data description entry is determined by type-name-1. The TYPE clause acts as if the data description entry of type-name-1 applies at the place where the TYPE clause is located with the exception of the level number, the name and the GLOBAL and TYPEDEF clauses which are specified intype-name-1.
If type-name-1 defines a group item, the following applies:
The current data description entry is a group item whose subordinate elements have the same name, description and hierarchy as the subordinate elements of type-name-1.
The level numbers of the data description entries which are subordinate to the current data description entry are adapted if necessary in order to retain the hierarchy of type-name-1.
Consequently level numbers in the resultant hierarchy can exceed 49.
The current data description entry is aligned to doubleword boundary.