The TYPEDEF clause is used to create a new user-defined data type, type-name. The name of the new user-defined data type is the subject of the TYPEDEF clause. Data-name-1 must be specified with the TYPEDEF clause: FILLER cannot be used. The TYPEDEF clause must immediately follow data-name-1. After defining a new data type using the TYPEDEF clause, data items can be declared as this new data type using the TYPE clause. For more information about the TYPE clause, refer to TYPE Clause.
>>-+----+--TYPEDEF--------------------------------------------->< '-IS-'
The TYPEDEF clause can only be specified for level 01 entries, which can also be group items. If a group item is specified, all subordinate items of the group become part of the type declaration. No storage is allocated for a type declaration.
TYPEDEF cannot be used with complex OCCURS DEPENDING ON. This means that you cannot specify an OCCURS DEPENDING ON clause within a table that is part of a TYPEDEF. For more information, see Appendix H. Complex OCCURS DEPENDING ON.
The TYPEDEF clause can only be specified in the WORKING-STORAGE, LOCAL-STORAGE, LINKAGE, or FILE sections of a program.
The TYPE clause can be specified in the same data description entry as the TYPEDEF clause.