Data Definition Language (DDL) Reference Manual

SPI Tokens
Data Definition Language (DDL) Reference Manual529431-004
7-10
TOKEN-CODE Statement Output
Default display format: display format for the data type specified in the definition
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.
Topics:
TOKEN-CODE Statement Output on page 7-10
Standard SPI TOKEN-CODE Definitions on page 7-10
TOKEN-CODE Statement Output
If you request C, COBOL, Pascal (on D-series systems), pTAL, TACL, or TAL source
code, the DDL compiler 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 data structures the DDL compiler generates for token codes in each language are:
The DDL compiler replaces any hyphen in a DDL name with a circumflex (^) in a pTAL
or TAL LITERAL name or in a TACL STRUCT name, and with an underscore (_) in a C
#define name or a Pascal defined constant name.
Standard SPI TOKEN-CODE Definitions
SPI supplies a set of standard token codes to satisfy needs that are common to most
programmatic interfaces. The standard token-code names have the format:
Zsss-TKN-name
In this format, the letter Z indicates that the token code is defined by HP, sss is a
subsystem name or a standard SPI name, and name is the token name.
Language Data Structure
C
#define TOKEN_NAME value
COBOL 01 token-name NATIVE-4 VALUE IS value
Pascal (on D-series systems) CONST token_name = value;
TACL ?Section token^name Struct
BEGIN
INT2 TOKEN^CODE VALUE value;
END;
pTAL or TAL Literal token^name = value;