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

SPI Concepts and Protocol
SPI Programming Manual427506-006
2-41
Empty Responses
Empty Responses
An empty response consists of a single response message that contains no response
records. An empty response must contain a return code (ZSPI-TKN-RETCODE) with a
subsystem-defined error number that declares that the response message contains no
response records. In special cases, an empty response might also contain error
information describing the command. (See point 3.)
An empty response message does not always indicate an empty response. An empty
response message is sometimes needed to complete a continued response, in which
case only the last message of the response is empty, but not the response itself (see
point 2 below).
A server returns an empty response message when (see Figure 2-13
on page 2-42):
1. The requester sets ZSPI-TKN-RESPONSE-TYPE to ZSPI-VAL-ERR-AND-WARN,
and the server detects no errors or warnings during command processing. In this
case, the requester has asked the server to return a response record only if an
error or warning is detected while applying the command to an object. Because no
errors or warnings are detected, the server returns an empty response. (For
information about the RESPONSE-TYPE token, see Suppressing Response
Records on page 2-43.)
2. Objects awaiting command continuation are deleted before the server sends the
continuation request. This is possible any time the server returns a partial
response and has additional objects to process. The context token in the partial
response identifies the next object to be processed. If the objects awaiting
processing are deleted before the requester sends the continuation command to
the server, the server finds no objects to process and returns an empty response
message to complete the continued response.
3. The requester sets ZSPI-TKN-RESPONSE-TYPE to ZSPI-VAL-ERR-AND-WARN
and the server detects no errors or warnings when applying the command to
individual objects, but does want to return warning information describing the
command in general. In this case, the server returns the warning information in the
empty response message. (It is still called an empty response message
because ZSPI-TKN-RETCODE contains the value indicating an empty response.)