Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 39
SQLNULLABLE Clause
•
If the DDL clause NULL is specified for a line item, NOT SQLNULLABLE cannot be
specified or implied for that item.
•
SQLNULLABLE and NOT SQLNULLABLE cannot be specified on a line item
whose data type has been set by a previous definition, nor on a group or subgroup
that contains such a line item.
•
A SQL-nullable line item is a word-aligned item regardless of its data type. An
implicit filler of one byte is generated, when necessary, preceding the SQL-nullable
line item.
•
The SQLNULLABLE or NOT SQLNULLABLE attribute is inheritable. That is, a line
item that refers to a definition that is SQL-nullable becomes SQL-nullable as well; a
line item that refers to a definition that is not SQL-nullable becomes itself not SQL-
nullable.
•
A SQL-nullable line item can redefine another line item and can itself be redefined.
If an SQL-nullable line item is redefined, the maximum byte size of the redefining
line item is the specified size of the SQL-nullable line item plus 2.
•
If an EDIT-PIC clause or a literal string is specified on a null line item, the length of
the string must be less than or equal to the specified size of the line item. Do not
include the added numeric field as part of the available space for the string.
•
If an odd-byte length is specified on an SQL-nullable line item that has an
OCCURS clause specified or implied, the internal total size of the line item is
calculated by:
Occurrences specified * (a 2-byte numeric field + the byte length spe a
1-byte padded filler)
Because an SQL-nullable line item is word-aligned, a filler is padded to align each
repetition of an SQL-nullable line item with odd-byte length. A padded filler is not
required for a repetition of an SQL-nullable line item specified with even-byte
length.
The implicit filler emitted by DDL is generated explicitly in language outputs, but
not for C or Pascal.
•
The maximum actual internal byte size of an SQL-nullable line item is 32,767 bytes
in definitions; in records, it is:
Because of this restriction, the maximum size that can be specified on an SQL-
nullable line item is two bytes less than the numbers shown above. These two
bytes are the indicator that shows whether the line item is null.
Entry-sequenced files
4,072 bytes
Key-sequenced files
4,062 bytes
Relative files
4,072 bytes
Unstructured files
4,096 bytes