Data Definition Language (DDL) Reference Manual
Definition Attributes
Data Definition Language (DDL) Reference Manual—529431-004
6-84
88 Condition-Name
A COBOL program can use the construct in Example 6-68 on page 6-84 to determine
the appropriate customer address: for example:
IF shipping PERFORM A00-send-ship-list.
Example 6-68. Condition-Name Clauses
DEF cust-addr-cd.
02 addr-code TYPE BINARY 16.
88 corp-hdq VALUE 01.
88 shipping VALUE 02, 03.
88 billing VALUE 04 THRU 07.
88 sales VALUE 11 THRU 13, 15.
END
Example 6-69. Condition-Name Values as Constants
CONSTANT corp-hdq VALUE 01.
CONSTANT shipping1 VALUE 02.
CONSTANT shipping2 VALUE 03.
CONSTANT billing1 VALUE 04.
CONSTANT billing2 VALUE 05.
CONSTANT billing3 VALUE 06.
CONSTANT billing4 VALUE 07.
CONSTANT sales1 VALUE 11.
CONSTANT sales2 VALUE 12.
CONSTANT sales3 VALUE 13.
CONSTANT sales7 VALUE 17.
DEF cust-addr-cd.
02 addr-code TYPE BINARY 16.
88 corp-hdq VALUE corp-hdq.
88 shipping VALUE shipping1 THRU shipping2.
88 billing VALUE billing1 THRU billing4.
88 sales VALUE sales1 THRU sales3, sales7.
END
Example 6-70. Condition-Names as Enumeration Values
DEF prts-ddl-object-type TYPE ENUM BEGIN AS "Miscellaneous".
88 bolt VALUE prts-enm-bolt.
88 nut VALUE prts-enm-nut.
88 pin VALUE prts-enm-pin.
88 screw VALUE prts-enm-screw.
88 washer VALUE prts-enm-washer.
89 prts-enm-bolt VALUE IS prts-obj-bolt AS "Bolt".
89 prts-enm-nut VALUE IS prts-obj-nut AS "Nut".
89 prts-enm-pin VALUE IS prts-obj-pin AS "Pin".
89 prts-enm-screw VALUE IS prts-obj-screw AS "Screw".
89 prts-enm-washer VALUE IS prts-obj-washer AS "Washer".
END.