Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 84
VALUE Clause
The following statements override or suppress these initial values:
The next example uses the names of enumeration values in VALUE clauses:
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.
This example uses national-literal values:
DEF sample-type PIC NN.
DEF language-info.
02 language TYPE sample-type VALUE N"ab".
END.
The following example uses
sql-literal
values:
DEF birthday TYPE SQL DATETIME year to day.
DEF family-birthday.
02 father TYPE birthday VALUE "1945-12-12".
02 mother TYPE birthday VALUE "1948-08-14".
02 sister TYPE birthday VALUE "1980-01-13".
END.
DEF job-schedule.
02 task1 TYPE SQL INTERVAL day 2 VALUE "12".
! An interval of 12 days
02 task2 TYPE SQL INTERVAL minute TO second VALUE "5:30".
! An interval of 5 minutes and 30 seconds
END.
DEF base-price TYPE price
VALUE IS 20.00.
DEF cust-name TYPE name
NOVALUE.
Override initial value
Suppress initial value
VST615.vsd