Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 88
88 Condition-Name Clause
•
The syntax for a DDL level 88 clause differs from a COBOL level 88 clause only in
its punctuation; DDL requires commas between values or sets of values, whereas
COBOL does not.
•
The rules for the VALUE clause apply to the VALUE portion of a level 88 clause.
•
One or more condition-name clauses can follow the definition attribute clauses in a
field definition or description. Condition-name clauses cannot directly follow a
group definition or description.
•
Values of different condition names can overlap, so it is possible for several
condition names to have the same value.
•
A single-field definition that has one or more level 88 clauses must also have
BEGIN before the first period and END after the last clause.
Condition-Name Clause Examples
The values in ADDR-CODE are associated with condition names:
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
A COBOL program can use the preceding construct to determine the appropriate
customer address. For example:
IF shipping PERFORM A00-send-ship-list.
You can also specify condition-name values as constant names; for example:
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