SPI Tokens
Data Definition Language (DDL) Reference Manual — 426798-002
7- 16
TOKEN-MAP Statement
group-name
identifies a group within the definition.
TOKEN-MAP Statement Guidelines
The following points are guidelines for using the TOKEN-MAP statement:
•
A token map is a special kind of token code used to identify an extensible
structured token to which new fields can be added in subsequent versions. You
identify a token map by its
token-name
.
•
You do not specify the token type of a token map. The token type of every token
map, ZSPI-TYP-MAP, is defined by SPI; it consists of the token data type ZSPI-
TDT-MAP and a token length of 255.
•
You define the structure of the extensible structured token by referring to an
existing definition,
def-name
, in the TOKEN-MAP statement.
•
You must specify a VERSION or NOVERSION clause in the TOKEN-MAP
statement for every field or group of fields in the referenced definition.
°
The version number in a VERSION clause specifies the subsystem version in
which the field or group of fields was introduced.
°
A NOVERSION clause is used for fields whose presence is indicated by the
value of another field in the structure
−
an is-present field.
•
When VERSION or NOVERSION is specified for a group, the following rules apply:
°
Every field in the group inherits the version specified for the group.
°
No field within the group can have a VERSION or NOVERSION clause.
•
If you specify a VERSION or NOVERSION clause for a range of fields or groups,
you must not specify a VERSION or NOVERSION clause for any field or group
within the range; this could result in a field having more than one version.
•
An extensible structured token should be extended only by adding new fields to the
end of the token. As new fields are added, new VERSION or NOVERSION clauses
must be added to the token map for the new fields in the extensible structured
token.
•
For more information on using versions in extensible structured tokens, see the
SPI Programming Manual and the SPI Common Extensions Manual.
•
Every field in the referenced definition must have an SPI null value to which the
field is initialized by SPI before actual values are placed in the field. SPI null values
indicate the presence or absence of a value in the field. A field with an SPI null
value is effectively not present. The SPI null value can be:
°
Explicitly specified with an SPI-NULL clause (described in
Section 6, Definition
Attributes
).