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

SPI Programming in TACL
SPI Programming Manual427506-006
8-13
#SSPUT
Specifying a count parameter greater than one for #SSPUT is equivalent to
calling #SSPUT
count number of times in succession with a count of 1 (but
supplying a new
token-value before each call).
If count is greater than 1 and the token is of variable length, the length of each
token value must be an even number of bytes to ensure word alignment. For
example, the object-name token used by extended-SPI subsystems,
ZCOM^TKN^OBJNAME, is a variable-length character string. This #SSPUT call
places in the buffer two object-name tokens whose values are abc and defgh:
#SSPUT /COUNT 1/ buf ZCOM^TKN^OBJNAME 3 abc 5 defgh
The order in which tokens are added to the buffer is not significant except in the
case of (1) #SSPUT calls with token codes for tokens that start and end lists
(ZSPI^TKN^DATALIST, ZSPI^TKN^ERRLIST, ZSPI^TKN^LIST,
ZSPI^TKN^SEGLIST, and ZSPI^TKN^ENDLIST), and (2) a few subsystem-specific
exceptions mentioned in the subsystem manuals (for example, the
ZEMS^TKN^SUBJECT^MARK token in an event message).
Adding a token to the buffer with #SSPUT does not affect the current position for
subsequent calls to #SSGET or #SSGETV.
Special Operations for #SSPUT and #SSPUTV
Table 8-2 lists the header tokens your programs can supply to #SSPUT and #SSPUTV
to set or change the corresponding values, and the tokens your programs can pass to
#SSPUT and #SSPUTV to perform special operations.
Header tokens for #SSPUT and #SSPUTV include tokens to enable or disable
checksum protection, specify the maximum-response value, restore the current
position to an earlier value, and specify the server version. These tokens are present in
the buffer but differ from other tokens in certain ways, as described in Section 2, SPI
Concepts and Protocol. (One header token, ZSPI^TKN^POSITION, can also be
considered a special operation for SSPUT. It is classified here as a header token
because it is a header token for #SSGET and #SSGETV, and because it is present in
the buffer and has the header-token characteristics given in Section 2, SPI Concepts
and Protocol.)
Special operations for #SSPUT and #SSPUTV include clearing the last-error
information, flushing data from the buffer, deleting tokens, and initializing the current
position. These tokens are not present in the buffer but simply serve as parameters to
#SSPUT and #SSPUTV.
Table 8-2. #SSPUT(V) Special Operations (page 1 of 2)
Token Specified in #SSPUT(V) call Type Effect
ZSPI^TKN^BUFLEN UINT Modify buffer length
ZSPI^TKN^CHECKSUM BOOLEAN Enable or disable buffer checksum
ZSPI^TKN^CLEARERR Clear last-error information to zero