Data Definition Language (DDL) Reference Manual
SPI Tokens
Data Definition Language (DDL) Reference Manual—529431-004
7-7
Standard SPI TOKEN-TYPE Definitions
The DDL compiler generates the token-type value in Example 7-3 on page 7-7 by left-
shifting the token length in the second (low-order) byte and combining it with the token
data type in the first (high-order) byte.
The generated values in Example 7-4 on page 7-7 are identical to the values
generated for COBOL or TACL source-code output from the same TOKEN-TYPE
statements.
The generated values in Example 7-5 on page 7-7 are identical to the values
generated for pTAL, TAL, or COBOL source-code output from the same TOKEN-TYPE
statements.
Example 7-3. COBOL Source Code Generated for Example 7-2 on page 7-6
01 ZSPI-TYP-INT NATIVE-2 VALUE IS 514.
01 ASSN-TYP-STATUS NATIVE-2 VALUE IS 514.
01 ASSN-TYP-VARIABLE-TOKEN NATIVE-2 VALUE IS 1023.
Example 7-4. TAL Source Code Generated for Example 7-2 on page 7-6
Literal ZSPI^TYP^INT = 2 '<<' 8 + 2;
Literal ASSN^TYP^STATUS = 2 '<<' 8 + 2;
Literal ASSN^TYP^VARIABLE^TOKEN = 3 '<<' 8 + 255;
Example 7-5. TACL Source Code Generated for Example 7-2 on page 7-6
?Section ZSPI^TYP^INT Struct
BEGIN
UINT TOKEN^TYPE VALUE 514;
END;
?Section ASSN^TYP^STATUS Struct
BEGIN
UINT TOKEN^TYPE VALUE 514;
END;
?Section ASSN^TYP^VARIABLE^TOKEN Struct
BEGIN
UINT TOKEN^TYPE VALUE 1023;
END;
Example 7-6. C Source Code Generated for Example 7-2 on page 7-6
#pragma section zspi_typ_int
#define ZSPI_TYP_INT 514U
#pragma section assn_typ_status
#define ASSN_TYP_STATUS 514U
#pragma section assn_typ_variable_token
#define ASSN_TYP_VARIABLE_TOKEN 1023U