Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 83
VALUE Clause
•
If you specify a
datetime-literal
or an
interval-literal
for a character
field, DDL treats the literal as a regular character string. In such a case, DDL does
not check the syntax and semantics of the string.
•
If you specify a
datetime-literal
or an
interval-literal
for a numeric
field, DDL returns an error.
•
VALUE ZERO and VALUE ZEROES cannot be specified for SQL DATETIME and
SQL INTERVAL line items.
•
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 DDL is generating source code for C,
FORTRAN, pTAL, or TAL, the compiler translates any initial values into comments.
•
When DDL is generating Pascal or TACL source code, it ignores the VALUES
clause.
•
For C and Pascal, a NOVALUES clause on a group definition has no effect on
subgroups defined by reference to other groups.
•
CURRENT is valid only for elementary fields of type SQL DATETIME. If the type
was previously defined, the definition must be a field definition with an SQL
DATETIME type specified.
•
SQLNULL is valid only for SQL-nullable elementary line items (that is, SQL items
that are not specified as NOT NULL). If the type was previously defined, the
definition must be an SQL-nullable field definition.
•
The values SYSTEM, CURRENT, and SQLNULL cannot be specified in a MUST
BE clause, an 88 condition-name clause, or an 89 enumeration clause
•
If you specify a MUST BE clause and VALUE SYSTEM for the same item, DDL
does not check the value SYSTEM against the specified MUST BE constraint.
Similarly, if you specify a MUST BE clause and VALUE SQLNULL for the same
item, DDL does not check the value SQLNULL against the specified MUST BE
constraint.
VALUE Clause Examples
The following examples assign initial values to a field and a group definition:
DEF price PIC 9(5)V99 VALUE IS ZERO.
DEF name VALUE SPACES.
02 last PIC X(20).
02 first PIC X(12).
02 midinit PIC X(2).
END
Содержание DDL D40
Страница 36: ...Introduction to DDL Data Definition Language DDL Reference Manual 426798 002 1 14 Examining a Dictionary ...
Страница 66: ...Named Constants Data Definition Language DDL Reference Manual 426798 002 4 10 Standard SPI Constants ...
Страница 230: ...Dictionary Manipulation Statements Data Definition Language DDL Reference Manual 426798 002 8 14 SHOW USE OF Statement ...
Страница 370: ...Dictionary Maintenance Data Definition Language DDL Reference Manual 426798 002 10 24 Converting a Dictionary ...
Страница 456: ...Sample Schemas Data Definition Language DDL Reference Manual 426798 002 B 12 ASSNDDL Statements ...
Страница 470: ...DDL Data Translation Data Definition Language DDL Reference Manual 426798 002 C 14 ...
Страница 528: ...Dictionary Reports Data Definition Language DDL Reference Manual 426798 002 E 8 Requesting Reports ...
Страница 552: ...DDL Alignment Rules Data Definition Language DDL Reference Manual 426798 002 H 4 FIELDALIGN_SHARED8 Alignment Rules ...
Страница 576: ...Index Data Definition Language DDL Reference Manual 426798 002 Index 22 Special Characters ...