SPI Programming Manual (G06.24+, H06.03+, J06.03+)
General SPI Programming Guidelines
SPI Programming Manual—427506-006
5-23
Coding Subsystem Definitions
Token Map
For extensible structured tokens, programs pass to the SPI procedures an extended 
identifying code called a token map. A token map is a variable-length integer array. 
The first two words of a token map have the same structure as a token code. All token 
maps have a token data type of ZSPI-TDT-MAP, a token length of 255, and a token 
number specified by the subsystem.
Most subsystems define a set of token maps. Names of token maps are of the form 
subsys-MAP-name, where subsys is the four-character subsystem abbreviation and 
name identifies the token.
Coding Subsystem Definitions
To produce your subsystem definitions:
1. Write them in DDL.
2. Run the DDL compiler to translate them into definitions in the programming 
language you are using.
3. Include the appropriate language versions of the definitions in your subsystem 
programs. Application programs that communicate with your subsystem must also 
include the corresponding definition files. Because all the language versions of 
each definition file are derived from the same DDL source, the programming 
languages these applications use can be different from yours.
For consistency, the names in your DDL definitions should follow the same naming 
conventions used by NonStop Kernel subsystems (see Naming Conventions
 on 
page 2-11). Do not begin your own names (for definitions and for component fields of 
structures) with uppercase or lowercase
 Z
. Any names beginning with 
Z
 might be used 
now or later by software for the NonStop server.
This discussion gives special considerations for using DDL to code definition files for a 
subsystem. For syntax and general programming information for DDL, see the 
Data 
Definition Language (DDL) Reference Manual
.
Your subsystem should provide definitions for:
•
One or more recommended buffer-size values
•
Buffers of the recommended sizes
•
The subsystem ID
•
Command numbers for all commands
•
Object-type numbers for all object types
•
Token numbers for all tokens
•
Error numbers for all errors
•
Event numbers for all event messages










