Data Definition Language (DDL) Reference Manual
Definition Attributes
Data Definition Language (DDL) Reference Manual—529431-004
6-19
NULL
NULL
The NULL clause assigns a null value to a field or group used as an Enscribe alternate
key. If a record being inserted in the database has a null value in the alternate key
field, the alternate key is not added to the alternate key file.
character
is any ASCII character.
number
is any number from 0 through 255.
constant-name
is the name of a constant in the open dictionary. The constant value must be a
valid character or number value.
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 in the file to see if the value in the
alternate key field matches the null value. The effects of using a null value are:
•
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.
In Example 6-15 on page 6-20, if the employee does not have a spouse or
dependents, the key is not added to the alternate key file.
Note. The DDL compiler ignores this clause when generating host-language source code.
NULL { "character " | number | constant-name }