SPI Tokens
Data Definition Language (DDL) Reference Manual — 426798-002
7 -2
DDL Token-Definition Statements
DDL Token-Definition Statements
The DDL statements listed in
Table 7-1
define the token type and the token code of
every simple token and the token map of every extensible structured token used in SPI
messages, whether you specify the definitions or they are specified by SPI or other HP
software.
Note that the precise form of a token value is defined in a DEFINITION statement
(described in
Section 5, Definitions and Records
).
TOKEN-TYPE Statement
The TOKEN-TYPE statement defines a token type and adds the definition to an open
DDL 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, DDL replaces the existing token
type with the new token type. If the existing token type is referenced by another object,
DDL issues an error message and does not add the new token type to the dictionary.
If the appropriate source-code files are open, DDL generates C, COBOL, Pascal,
pTAL, TACL, or TAL token-type structures when it executes the TOKEN-TYPE
statement.
Table 7-1. Token-Definition Statements
Statement
Function
TOKEN-TYPE
Defines a token type to specify the data type and size of all tokens
of that token type; usually refers to an existing definition (or DEF)
to specify the token data type and token size.
TOKEN-CODE
Defines a token code to identify a simple token; refers to an
existing token type to specify the token data type and token size.
TOKEN-MAP
Defines a token map to identify an extensible structured token;
refers to an existing definition (or DEF) to specify the token
structure.
TOKEN-TYPE type-name
VALUE [ IS ] { token-data-type }
{ constant-name }
{ DEF [ IS ] def-name [ OCCURS { number } TIMES ] }
{ [ {constant-name} ] }
{ OCCURS VARYING [ DEF [ IS ] def-name ] }
{ OCCURS 0 TIMES }