Data Definition Language (DDL) Reference Manual
Definition Attributes
Data Definition Language (DDL) Reference Manual—529431-004
6-34
FORTRAN
FORTRAN
Pascal (D-series Systems Only)
For Pascal, the DDL compiler translates a REDEFINES clause to a variant record.
The variants within the record are the data items of the redefined structure and the
data items of the redefining structure.
The DDL compiler generates integer case labels for each variant. For each
REDEFINES clause, the integer case labeling begins at 1.
If the REDEFINES clause is not the last item in its group, the DDL compiler generates
an anonymous record to contain the variant or variants. The DDL compiler then issues
a warning. The DDL compiler generates the variant record name by prefixing a V_ to
Example 6-25. REDEFINES Clause With FORTRAN Output
DDL Input
DEF A.
02 B PIC 9(4).
02 C REDEFINES B.
04 C-1 PIC 9(2).
04 C-2 PIC 9(2).
02 D.
04 D-1 PIC X.
04 D-2 PIC 9 REDEFINES D-1.
02 E PIC 9(5).
02 F REDEFINES E.
04 F-1 PIC 9(3).
04 F-2 PIC 9(2).
END.
DDL Output (FORTRAN Code)
RECORD A
CHARACTER*4 B
RECORD C
CHARACTER*2 C1
CHARACTER*2 C2
END RECORD
EQUIVALENCE ( C, B )
RECORD D
CHARACTER*1 D1
CHARACTER*1 D2
EQUIVALENCE ( D2, D1 )
END RECORD
CHARACTER*5 E
RECORD F
CHARACTER*3 F1
CHARACTER*2 F2
END RECORD
EQUIVALENCE ( F, E )
END RECORD