Data Definition Language (DDL) Reference Manual
Definition Attributes
Data Definition Language (DDL) Reference Manual—529431-004
6-78
VALUE
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 a figurative constant.
The length of the national literal must agree with the length specified in the PICTURE
clause for the national data item.
If you specify a datetime-literal or an interval-literal for a character
field, the DDL compiler treats the literal as a regular character string. In such a case,
the DDL compiler does not check the syntax and semantics of the string.
If you specify a datetime-literal or an interval-literal for a numeric field,
the DDL compiler returns an error.
VALUE ZERO and VALUE ZEROES cannot be specified for some SQL data types
(see the SQL/MP Reference Manual and SQL/MX Reference Manual).
SYSTEM is valid only for elementary fields of any type. If the type was previously
defined, the definition must be a field definition.
When the VALUES clause is specified and the DDL compiler is generating source
code for C, FORTRAN, pTAL, or TAL, the compiler translates any initial values to
comments.
When the DDL compiler is generating Pascal (on D-series systems) or TACL source
code, it ignores the VALUES clause.