Data Definition Language (DDL) Reference Manual

SPI Tokens
Data Definition Language (DDL) Reference Manual529431-004
7-2
Defining SPI Tokens
Defining SPI Tokens
An SPI token has two parts:
An identifying code
A token value
A token value is referenced by its token code rather than by its position in the buffer or
by its address.
There are two forms of SPI tokens:
Tokens are defined by these dictionary objects:
TOKEN-TYPE
The TOKEN-TYPE statement defines a token type and adds the definition to the open
dictionary.
If a TOKEN-TYPE statement identifies a token type that already exists in the open
dictionary and that is not referenced by another object, the DDL compiler replaces the
existing token type with the new token type. If the existing token type is referenced by
another object, the DDL compiler issues an error message and does not add the new
token type to the dictionary.
If the appropriate source code files are open, the DDL compiler generates C, COBOL,
Pascal (on D-series systems), pTAL, TACL, or TAL token-type structures when it
executes the TOKEN-TYPE statement.
Token Form Values Defined By Identifying Code
Simple Single fields or fixed
structures
Token type (which
determines data type and
size)
Token code
Extensible
structured
Extensible (new fields
can be added to the
token in subsequent
product versions to
provide new features)
The standard token type
that all extensible
structured tokens have
Token map
Object Definition Statement That Defines Object
Token type Data type and size of one or more
tokens
TOKEN-TYPE
on page 7-2
Token code Identifying code of a simple token TOKEN-CODE
on page 7-8
Token map Identifying code of an extensible
structured token
TOKEN-MAP
on page 7-13