Data Definition Language (DDL) Reference Manual (G06.24+)
SPI Tokens
Data Definition Language (DDL) Reference Manual—426798-002
7-10
TOKEN-CODE Statement
[ DISPLAY { “display-format” } ]
[ { constant-name } ]
specifies the display format for a token.
If the DISPLAY clause is omitted, the display format for the token is based on the
data type specified in the definition.
display-format
is a format code described in the DSM Template Services Manual.
constant-name
is the name of a constant in the open DDL dictionary. The constant value must be
a valid display-format value.
TOKEN-CODE Statement Guidelines
The following points are guidelines for using the TOKEN-CODE statement:
•
A token code is a 2-word structure that consists of a token type defined in a prior
TOKEN-TYPE statement and the token number specified in the TOKEN-CODE
statement.
•
Every token code is implicitly or explicitly qualified by an SPI subsystem ID. Two
tokens of the same token type but qualified by different subsystem IDs can have
identical token numbers and still be differentiated by SPI.
•
Within a subsystem, tokens must be differentiated by their token numbers.
The following guidelines apply to source code that DDL generates for the TOKEN-
CODE statement:
•
If you request C, COBOL, Pascal, pTAL, TACL, or TAL source code, DDL
generates compatible data structures for the requested language. The SPI routines
use these token-code data structures to identify a token and its data type.
•
The following shows the data structures DDL generates for token codes in each
language:
Language Data Structure
C
#define TOKEN_NAME value
COBOL 01 token-name NATIVE-4 VALUE IS value
Pascal CONST token_name = value;
TACL ?Section token^name Struct
BEGIN
INT2 TOKEN^CODE VALUE value;
END;
pTAL or TAL Literal token^name = value;