Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 20
NULL Clause
NULL Clause
The NULL clause specifies a null value for an Enscribe alternate key. If a record being
inserted into the database has a null value in the alternate key field, the alternate key is
not added to the alternate key file.
DDL ignores the NULL clause when generating host-language source code.
Note that NULL and SQLNULL are not the same. SQLNULL is described under
VALUE
Clause
on page 6-79.
"character"
is any ASCII character enclosed in quotation marks.
number
is any number from 0 to 255; it must not be enclosed in quotation marks.
constant-name
is the name of a constant in the open DDL dictionary. The constant value must be
a valid
character
or
number
value.
NULL Clause Guidelines
The following points are guidelines for using the NULL clause:
•
Any alternate key can be assigned a null value. The most common null values are
ASCII blank (%40) and binary zero.
•
The null value used must fit in one byte.
•
When you generate FUP source code from the DDL definition, the FUP code
specifies alternate key file information, including the octal representation of the null
value you select.
•
The file system checks records as they are inserted into the file to see if the value
in the alternate key field matches the null value. The effects of using a null value
are as follows:
°
When records are inserted, if the record has an alternate key with a null value,
the key is not added to the alternate key file.
°
When records are updated, any alternate key with a null value is deleted from
the alternate key file.
°
If a file is read sequentially by an alternate key, any record with a null value for
that alternate key is not found.
{"character" }
NULL{number }
{constant-name}