SPI Programming Considerations for TMF
HP NonStop TMF Management Programming Manual—540140-008
3-6
Discontinuing a Command in Progress
TMF does not support multiple commands in a single request message. However,
many of the TMF commands accept multiple object names in one command (as many
as will fit in the buffer), so a single command can operate on a number of objects. All
objects named in a command must be of the same object type, for example, a program
can specify multiple ZTMF-TKN-AUDITTRAILID tokens in a STATUS AUDITTRAIL
command to determine the current activity of multiple audit trails. Object-name
templates (wild-card names), an implicit way of specifying more than one object in a
command, can also be used in many commands.
Discontinuing a Command in Progress
Commands in progress are cancelled using the CANCEL or CANCELREQ procedures.
Although there is no harm done by cancelling a command, the TMFSERVE process
does not check for request cancellation. If a requestor cancels a request to the
TMFSERVE process, it is impossible to determine whether or not the command was
performed. If the TMFSERVE process has already read the request, the cancellation is
not detected. The TMFSERVE process executes the request and issues a reply, which
the NonStop OS then discards. Cancellation does take effect if the TMFSERVE
process has not yet read the request.
The TMFSERVE process does not respond to requests for discontinuing a command
in progress, and TMF does not support the use of the standard SPI token ZSPI-TKN-
ALLOW-TYPE. TMF continues to the next object if it failed on a previous object.
Receiving and Decoding a Response Message
The following is a summary of the steps your application must take to receive and
decode a response message:
1. Declare a buffer of appropriate size.
2. Read the response message using the mechanism appropriate to your
programming language (for example, a WRITEREAD call in TAL).
3. Call SSGET or SSGETTKN to retrieve the values of header tokens and other
tokens from the buffer.
4. On encountering the data-list token (ZSPI-TKN-DATALIST) or the error-list token
(ZSPI-TKN-ERRLIST), make another call to SSGET or SSGETTKN to retrieve the
tokens inside the data list, including the error list if one exists.
5. On encountering a context token (ZSPI-TKN-CONTEXT), finish reading the other
tokens in the buffer. Then, optionally, use SSMOVE or SSMOVETKN to copy the
context token into the command buffer, and resend the command to get the next
message in the response.
Note.
Other subsystems (not TMF) use the ZSPI-TKN-ALLOW-TYPE token to allow an
application to specify (in a command operating on multiple objects) if the subsystem should
continue to the next object—if it failed on a previous one.
Summary of Contents for NonStop TMF
Page 4: ......