Data Definition Language (DDL) Reference Manual

Definition Attributes
Data Definition Language (DDL) Reference Manual529431-004
6-38
SPI-NULL
The SPI-NULL value must fit in one byte.
A field or group with an SPI null value in every byte is considered to have unspecified
data.
The SPI-NULL clause differs from the NULL clause in that:
The SPI-NULL clause is used only to assign an SPI null value to a field or a group
of fields that will be used in an SPI extensible structured token defined by a
TOKEN-MAP statement.
The NULL clause is used only to assign a null value to an alternate-key field
referenced in a RECORD statement.
Every field in a extensible structured token must have an SPI null value, whether
specified explicitly or implicitly by default.
For a field to contain an SPI null value, each byte of the field must contain the value
specified in the SPI-NULL clause. You use the SPI SSNULL procedure to fill the field
with the SPI null value specified in the SPI-NULL clause.
The SPI-NULL value for a bit field must be 255.
If SPI-NULL is not specified, the default SPI null value is 255; that is, SPI-NULL sets all
bits to 1.
An explicit SPI-NULL clause for a field or for a group containing the field overrides the
default SPI null value.
Do not specify a VALUE clause for a field or group used to define an extensible
structured token. Every field in an extensible structured token is initialized to its SPI
null value before it is used, so any initial value is overwritten.
If the field is used for other purposes, then you can specify a VALUE clause as well as
an SPI-NULL clause. In this case, the field is not initialized to its SPI null value but is
given the specified initial value. Because an initial value and an SPI null value are
never used for the same purpose, they need not be the same value.
An SPI-NULL clause specified in a group definition, or in a group description within a
group definition, is inherited by each of the fields within the group that has the clause.
A field within a group defined with an SPI-NULL clause cannot have its own SPI-NULL
clause.
When you refer to one definition from another:
If you specify an SPI-NULL clause in the referring definition or in any group that
includes the referring definition, the specified SPI null value overrides all SPI null
values in the referenced definition.
If you do not specify an SPI-NULL clause in the referring definition, the referring
definition inherits the SPI null value of the referenced definition.