SPI Programming Manual (G06.24+, H06.03+, J06.03+)

SPI Internal Structures
SPI Programming Manual427506-006
C-10
List Structure
TOKEN-MAP zbat-map-jobinfo VALUE IS zbat-tnm-jobinfo
DEF IS zbat-ddl-jobinfo.
VERSION "C00" FOR znumber THROUGH zlocation.
VERSION "C10" FOR zuserid-is-present.
NOVERSION FOR zuserid.
VERSION "C10" FOR zjobclass.
END
The resulting TAL code generated by the DDL compiler is:
?SECTION ZBAT^DDL^JOBINFO
STRUCT ZBAT^DDL^JOBINFO^DEF (*);
BEGIN
INT ZNUMBER;
INT ZPRIORITY;
STRUCT ZLOCATION;
BEGIN
STRUCT Z^C;
BEGIN STRING BYTE [0:7]; END;
STRUCT Z^S = Z^C;
BEGIN
INT Z^I[0:3];
END;
STRING Z^B[0:7] = Z^C;
END;
INT ZUSERID^IS^PRESENT;
STRUCT ZUSERID;
BEGIN
STRING ZBYTE[0:1];
END;
INT ZJOBCLASS;
END;
?SECTION ZBAT^TNM^JOBINFO
Literal ZBAT^TNM^JOBINFO = 63;
?SECTION ZBAT^MAP^JOBINFO
Define ZBAT^MAP^JOBINFO = [ 2303, 63, 18, 17152, 1024,
2136, 1, 17162, 544, 1, 0, 512,
1, 17162, 512 ]#;
Literal ZBAT^MAP^JOBINFO^WLN = 15;
In this case, NOVERSION is specified for the user ID field because the presence or
absence of the field is actually indicated by the IS-PRESENT Boolean.
List Structure
Each list token (each token of token type ZSPI-TYP-LIST and token length 0) is stored
in the buffer as a variable-length token (token type ZSPI-TKN-LIST and token length
ZSPI-TLN-VARIABLE, or 255). Its lengthwhich follows the token code, as for all
variable-length tokensincludes all tokens that are part of the list, including the end-
list token.