Data Definition Language (DDL) Reference Manual

SPI Tokens
Data Definition Language (DDL) Reference Manual529431-004
7-4
TOKEN-TYPE
DEF [ IS ] def-name
documents the token structure, not altering the host-language output, but
enabling SPI-buffer-display software to interpret the fields of tokens
defined using the token type.
OCCURS 0 TIMES
indicates that the token length is 0 (there is no token value).
Every simple token in an SPI message has a token type to define its data type and
length. You must specify the token type of a simple token in a TOKEN-TYPE
statement.
You cannot specify the token type of an extensible structured token because SPI
defines the token type of all extensible structured tokens as the DDL token type ZSPI-
TYP-MAP.
The token data type specified in the VALUE clause of the TOKEN-TYPE statement
must be a token data type that has been defined by SPI. If you specify the token data
type as a number, this number must be the value of a predefined token-data-type
constant. The token-data-type constants are defined in the file ZSPIDEF.ZSPIDDL.
Always refer to one of these constants for the token-data-type value.
The length of a simple token is determined by one of:
A definition referenced in a DEF IS clause, optionally repeated by an OCCURS
number TIMES clause
An OCCURS VARYING clause
An OCCURS 0 TIMES clause
Topics:
TOKEN-TYPE Statement Output on page 7-5
Standard SPI TOKEN-TYPE Definitions on page 7-5