The TYPEDEF clause defines a record as a programmer-defined type definition.
- The TYPEDEF clause can be specified only in data description entries whose level-number is 01.
- If TYPEDEF is specified, the following clauses cannot be specified:
If the TYPEDEF clause is specified for a group item, then subordinate items can be specified with OCCURS or REDEFINES clauses.
The VALUE clause cannot be specified either in the data descriptions specifying the TYPEDEF clause or in any subordinate item
except for condition-names (88 level entries) within the TYPEDEF structure.
- If the TYPEDEF clause is specified for a data description, then that same data description must include a data-name, that
is, it must not be specified with either an implicit or explicit FILLER clause.
- If a TYPEDEF clause is specified in a call prototype (a program with the EXTERNAL clause in its Program-ID paragraph) then
that TYPEDEF can be referenced in any subsequent source line of the compilation group.
- The purpose of using the TYPEDEF clause is to create a programmer-defined usage or structure that can subsequently be referenced
in the USAGE clause.
- A record declared with the TYPEDEF clause does not allocate any storage, but declares that data-name-1 can be specified in
a subsequent data description entry as typedef-name-1.