Data Definition Language (DDL) Reference Manual
SPI Tokens
Data Definition Language (DDL) Reference Manual—529431-004
7-21
Standard SPI Definitions in Token-Map Definitions
Example 7-21 on page 7-21 shows the DEFINITION and TOKEN-MAP statements 
when the JOBINFO token is extended to add new fields associated with product 
version “C10.”
Example 7-21 on page 7-21 assumes that every possible value of the integer field 
jobclass is legitimate so that an SPI null value cannot be used to indicate its 
presence or absence. In this case, the Boolean jobclass-is-present field 
indicates whether there is a jobclass value. When this technique is used, a product 
version is specified for jobclass-is-present and NOVERSION is specified for 
jobclass. NOVERSION removes the jobclass field from consideration when 
determining its product version; SPI assumes that the product version number of 
jobclass-is-present indicates the correct product version for jobclass.
For a description of using an is-present field, see the Distributed Name Service 
(DNS) Management Programming Manual.
Example 7-19. C Source Code Generated for Example 7-15 on page 7-20
#pragma section jobinfo_map
static int jobinfo_map[] = {2303,3,12,17152,1024,2136};
Example 7-20. Pascal Source Code Generated for Example 7-15 on page 7-20
?Section JOBINFO_MAP
VAR JOBINFO_MAP : Array [1..6 ] of INT16 := [2303,3,12,17152,
 1024,2136];
Example 7-21. Extending an Extensible Token
DEF assn-ddl-jobinfo. ! Defines fields in extensible structure
 02 jnumber TYPE zspi-ddl-int.
 02 priority TYPE zspi-ddl-int.
 02 location TYPE zspi-ddl-char8 SPI-NULL "X".
 02 jobclass-is-present TYPE zspi-ddl-boolean.
 02 jobclass TYPE zspi-ddl-int.
 02 jobusername TYPE zspi-ddl-username.
END
TOKEN-MAP assn-map-jobinfo VALUE IS assn-tnm-jobinfo
 DEF IS assn-ddl-jobinfo.
 VERSION "C00" FOR jnumber THRU location.
 VERSION "C10" FOR jobclass-is-present.
 NOVERSION FOR jobclass.
 VERSION "C10" FOR jobusername.
END










