Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 19
MUST BE Clause
•
Requesters generated by the Pathmaker product enforce the MUST BE
constraints; programs written by users must be coded to enforce these constraints
as well.
MUST BE Clause Examples
In this example, the MUST BE clause defines the acceptable ranges of values for days
in a month and months in a year:
DEF date.
02 day PIC 9(2)
MUST BE 1 THROUGH 31.
02 month PIC 9(2).
MUST BE 1 THROUGH 12.
02 year PIC 9(2).
END
If you specify the same MUST BE values frequently, you can define the values as
constants; for example:
CONSTANT sales VALUE 1.
CONSTANT shipping VALUE 2.
CONSTANT personnel VALUE 3.
DEF company.
02 department TYPE BINARY 16
MUST BE sales,
shipping,
personnel.
88 sales VALUE sales.
88 shipping VALUE shipping.
88 personnel VALUE personnel.
END
Notice that you can also use the constant names in condition-name clauses associated
with the definition.