Data Definition Language (DDL) Reference Manual
SPI Tokens
Data Definition Language (DDL) Reference Manual—529431-004
7-20
Standard SPI Definitions in Token-Map Definitions
Example 7-15 on page 7-20 describes an extensible structured token with three fields
and a total byte length of 12. Each field is defined by reference to a definition in the
standard SPI definition file ZSPIDEF.ZSPIDDL. The referenced definition determines
the data type of the field and specifies a default SPI null value for that field. The SPI
null value “X” explicitly specified for the field LOCATION overrides the standard SPI
null value for ZSPI-DDL-CHAR8, which is a set of empty quotes (“ ”). The token map
assigns product version “C00” to each of these fields−any subsystem of product
version C00 or later can access the entire structured token.
From the definitions in Example 7-15 on page 7-20, the DDL compiler generates the
source code in Example 7-16 on page 7-20 through Example 7-20 on page 7-21.
Example 7-15. Extensible Structured 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".
END.
CONSTANT assn-tnm-jobinfo VALUE IS 3.
TOKEN-MAP jobinfo-map VALUE IS assn-tnm-jobinfo
DEF is assn-ddl-jobinfo.
VERSION "C00" FOR jnumber THRU location.
END
Example 7-16. COBOL Source Code Generated for Example 7-15 on page 7-20
01 JOBINFO-MAP.
02 FILLER NATIVE-2 VALUE 2303. ! Token type ZSPI-TYPE-MAP
02 FILLER NATIVE-2 VALUE 3. ! Token number
02 FILLER NATIVE-2 VALUE 12. ! Token byte length
02 FILLER NATIVE-2 VALUE 17152. ! Product version "C00"
02 FILLER NATIVE-2 VALUE 1024.
02 FILLER NATIVE-2 VALUE 2136.
END.
Example 7-17. pTAL or TAL Source Code Generated for Example 7-15 on
page 7-20
DEFINE JOBINFO^MAP = [2303, 3, 12, 17152, 1024, 2136]#;.
LITERAL JOBINFO^MAP^WLN = 6; ! Number of words in token map
Example 7-18. TACL Source Code Generated for Example 7-15 on page 7-20
?Section JOBINFO^MAP Struct
BEGIN INT2 CODE VALUE 150929411; ! Value generated from token code
INT MAP (0:3) VALUE 12 17152 1024 2136; ! Values for rest of map