HP DDL D40 Reference Manual page 182

Data definition language
Table of Contents

Advertisement

Definition Attributes
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
88 corp-hdq
88 shipping
88 billing
88 sales
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
CONSTANT shipping1 VALUE 02.
CONSTANT shipping2 VALUE 03.
CONSTANT billing1
CONSTANT billing2
CONSTANT billing3
CONSTANT billing4
CONSTANT sales1
CONSTANT sales2
CONSTANT sales3
CONSTANT sales7
DEF cust-addr-cd.
02 addr-code
88 corp-hdq
88 shipping
88 billing
88 sales
END
Data Definition Language (DDL) Reference Manual—426798-002
TYPE BINARY 16.
VALUE 01.
VALUE 02, 03.
VALUE 04 THRU 07.
VALUE 11 THRU 13, 15.
VALUE 01.
VALUE 04.
VALUE 05.
VALUE 06.
VALUE 07.
VALUE 11.
VALUE 12.
VALUE 13.
VALUE 17.
TYPE BINARY 16.
VALUE corp-hdq.
VALUE shipping1 THRU shipping2.
VALUE billing1 THRU billing4.
VALUE sales1 THRU sales3, sales7.
6- 88
88 Condition-Name Clause

Advertisement

Table of Contents
loading

Table of Contents