Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 78
USAGE Clause
definition or description does not match the storage allocation for index names in the
target language.
The following code examples illustrate the translation of PACKED-DECIMAL items to
COBOL-85.
When the DDL compiler receives a request for the above items in languages other
than COBOL, DDL issues an error message and does not generate the source output.
DDL
COBOL
DEF abc TYPE BINARY 32
USAGE IS INDEX.
DEF xyz TYPE BINARY
USAGE IS INDEX.
DEF tst TYPE abc.
DEF grp.
02 item-1 TYPE xyz.
02 item-2 PIC 9(10).
END.
01 ABC USAGE IS INDEX.
Invalid - ERROR
01 TST NATIVE-4.
01 GRP.
02 ITEM-1 NATIVE-2.
02 ITEM-2 PIC 9(10).
DDL
COBOL
DEF def1 PIC 9(4) COMP-3.
01 def1 PIC 9(4) COMP-3.
DEF def2 PIC 9(4) COMPUTATIONAL-3.
01 def2 PIC 9(4) COMP-3.
DEF def3 PIC 9(4) PACKED-DECIMAL.
01 def3 PIC 9(4) COMP-3.
DEF grp1 COMP-3.
02 fld1 PIC 99.
02 fld2 PIC 99.
END.
01 grp1 USAGE IS COMP-3
02 fld1 PIC 99.
02 fld2 PIC 99.
DEF grp2.
02 g1 TYPE grp1.
END.
01 grp2.
02 g1.
03 fld1 PIC 99 COMP-3.
03 fld2 PIC 99 COMP-3.
DEF grp3.
02 h1 TYPE grp1 COMP-3
END.
01 grp3.
02 h1 USAGE is COMP-3.
03 fld1 pic 99.
03 fld2 pic 99.