Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 40
SQLNULLABLE Clause
•
SQLNULLABLE cannot be specified for FILLER or BIT line items; these types of
items can never be SQL-nullable. SQLNULLABLE cannot be specified on a group
that contains a FILLER or BIT line item unless that line item is explicitly declared to
be NOT SQLNULLABLE.
•
Neither SQLNULLABLE nor NOT SQLNULLABLE can be specified on an 88
condition-name line item or an 89 enumeration line item.
•
The dictionary fields that support SQL-nullable items are described in
Appendix D,
Dictionary Database Structure
.
SQLNULLABLE Clause Examples
In the following two examples, DEF A has no specification regarding SQL-nullability,
with the result that line items within the group are not SQL-nullable unless individually
declared otherwise. DEF B is specified as being SQLNULLABLE, with the result that
line items within that group are SQL-nullable unless individually declared otherwise:
Semantically, the preceding two examples are equivalent, although they are defined
differently.
DEF A .
02 name PIC X (25).
02 nickname PIC X (10) VALUE SQLNULL SQLNULLABLE.
02 salary TYPE BINARY.
02 hire-date TYPE DATE.
02 subordinate TYPE VARCHAR 15 SQLNULLABLE OCCURS 10
TIMES.
END .
DEF B SQLNULLABLE.
02 name PIC X (25).
02 nickname PIC X (10) VALUE SQLNULL SQLNULLABLE.
02 salary TYPE BINARY.
02 hire-date TYPE DATE.
02 subordinate TYPE VARCHAR 15 SQLNULLABLE OCCURS 10
TIMES.
END .
Not nullable.
Only a nullable line can have
VALUE SQLNULL specified.
Not nullable.
Not nullable.
A nullable VARCHAR line
has an OCCURS clause
specified.
VST610.vsd