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

SPI Internal Structures
SPI Programming Manual427506-006
C-8
Token-Map Example
One or more null-value specifications
As new fields are added, additional version specifications for the new fields
In more detail, a token map can be seen as a token-map header followed by one or
more null-value specifications and zero or more version specifications. Figure C-6
shows the formats of the token-map header, a null-value specification, and a version
specification.
Null-value specifications and version specifications can occur in any order and can be
intermixed. The end of the map is indicated when the byte lengths of the null-value
specifications add up to the total byte length of the structure value.
The SSNULL procedure constructs the null value of the structure by processing the
null-value specifications in the order that they appear in the map. For each null-value
specification, SPI copies the indicated null value into the next
n bytes of the structure,
where
n is the byte length from the null-value specification. The version of any byte in
the structure is that of the most recently encountered version when the null-
construction process reaches that byte of the structure.
Token-Map Example
These DDL definitions:
DEFINITION zbat-ddl-jobinfo.
02 znumber TYPE zspi-ddl-int.
02 zpriority TYPE zspi-ddl-int.
02 zlocation TYPE zspi-ddl-char8 SPI-NULL "X".
END
Figure C-6. Structures Within a Token Map
VST028.vsd
Null Byte
Null-Value
Specification
Version
Specification
Version Flag
Byte Length
0 1
New Version
Token-Map
Header
Token Type (ZSPI-TKN-MAP)
Token Number
Structure Byte Length
Version of First Field