SPI Reference Summary
SPI Standard Definitions
SPI Reference Summary—427507-006
1-3
Data Items and Structures
Data Items and Structures
SPI provides these data items and structures:
SPI Buffer on page 1-3
Subsystem ID on page 1-4
Command Number on page 1-4
Object-Type Number on page 1-4
Token on page 1-4
Error Number on page 1-5
SPI Buffer
SPI messages are composed in a specially allocated block of memory called an SPI
buffer. A SPI buffer consists of a header, which contains message information common
to all command and response messages, and a variable-length body containing
message tokens.
Three fields in the header are particularly relevant to programmers:
Header tokens follow. For descriptions, see Token Codes on page 1-20. For their use
in procedure calls, see the procedures in Section 2, SPI Procedures and Functions.
SPI Header Tokens
Z-MSGCODE Signed integer; value is always -28.
Z-BUFLEN Unsigned integer; value is the maximum buffer length in bytes.
Z-OCCURS Unsigned integer used for COBOL I/O buffers.
Header Token Contents (page 1 of 2)
ZSPI-TKN-BUFLEN Buffer length
ZSPI-TKN-CHECKSUM Checksum flag
ZSPI-TKN-COMMAND Command number
ZSPI-TKN-HDRTYPE Header type
ZSPI-TKN-LASTERR Error number of the last nonzero SPI procedure error
ZSPI-TKN-LASTERRCODE Token code from the last SPI call with a nonzero
error
ZSPI-TKN-LASTPOSITION Position of last token added by SSPUT
ZSPI-TKN-MAX-FIELD-VERSION Most recent version of any non-null extensible
structure field
ZSPI-TKN-MAXRESP Maximum response records per message
ZSPI-TKN-OBJECT-TYPE Object-type number
ZSPI-TKN-POSITION Current token position for SSGET