Data Definition Language (DDL) Reference Manual (G06.24+)

Definition Attributes
Data Definition Language (DDL) Reference Manual426798-002
6-82
VALUE Clause
An initial value must be compatible with the data type of the field or group for which
it is declared.
An initial value declared at the group level must be alphanumeric.
A numeric value must be in the range of values specified by the receiving
PICTURE string.
If used with MUST BE, an initial value must be in the range of values specified by
the MUST BE string.
If a field is described as signed (the PICTURE clause includes the symbol S), you
can include a sign in the numeric value. The sign must be leading in all cases,
regardless of whether the PICTURE clause specifies a leading or trailing sign. An
initial value cannot be:
°
Used with a REDEFINES or OCCURS entry
°
Composed of a null character string ("")
The only figurative constant that can be used to assign a value to a numeric data
type is ZERO (or ZEROS or ZEROES).
A field can have both a VALUE clause and an UPSHIFT clause. If these clauses
are used together, you must specify any alphabetic characters in the VALUE
clause as uppercase.
If an initial value is specified at a group level, no other initial value can be specified
within the group.
If a DEFINITION statement that includes an initial value is referenced by a
statement that also includes an initial value, the DDL compiler overrides the
referenced value with the value in the referring statement.
When you specify a constant name in a VALUE clause, the constant value must be
a valid value for the data item and of the same type. A numeric constant can be
used only with numeric-type data items, a string constant can be used only with
character-type data items, and a national literal can be used only with national
data items.
If you specify an initial value for a national data item, the value must be a national
literal or one of the following figurative constants:
LOW-VALUE[S}
HIGH-VALUE[S]
QUOTE[S]
SPACE[S]
ZERO[[E]S]
ALL literal
The length of the national literal must agree with the length specified in the
PICTURE clause for the national data item.