DSM/Tape Catalog Management Programming Manual

SPI Programming Considerations
DSM/Tape Catalog Management Programming Manual520481-003
3-8
A Command in Progress, Discontinuing
structured variable, then later you can add its contents to the buffer as the value of a
structured token.
A program can supply multiple occurrences of the same token in a command message
for a MEDIASRV process. For example, a program can specify multiple ZMCS-TKN-
TAPEVOLUME tokens in an ALTER TAPEVOLUME command to name the files that will
change status in the volume catalog or pool.
A program first calls the SSINIT procedure, then must (at minimum) supply:
A message buffer
The length of the message buffer
The DSM/TC subsystem ID
The command code and object-type code to be sent to the MEDIASRV process
The SSINIT procedure initializes the buffer and places the information supplied by the
program in the buffer. The program can then supply parameters for the command by
calling the SSPUT procedure one or more times. In each SSPUT call, the program
supplies the name of the message buffer, a parameter token code, and a parameter
value.
A Command in Progress, Discontinuing
A MEDIASRV process does not respond to requests for discontinuing a command in
progress, and the DSM/TC subsystem does not support the use of the standard SPI
token ZSPI-TKN-ALLOW-TYPE. The DSM/TC subsystem continues to the next object
if it failed on a previous object.
Response Buffers, Receiving and Decoding
To reduce the number of response messages, request multiple response records in a
message. You can specify the ZSPI-TKN-MAXRESP token in the call to SSINIT and
use it to select the number of response records returned in a single reply message.
To retrieve items from a data list, you call the SSGET procedure with the ZSPI-TKN-
DATALIST token and an index of the data list you want to retrieve. For example, if you
have five response records in a message and each one is enclosed in a data list, you
call the SSGET procedure with the index parameter indicating 1 for the first data list, 2
for the second, and so on. After processing the data list, call SSGET with the ZSPI-
TKN-ENDLIST token to exit from the data list currently selected.
DSM/TC supports continuation (multiple response records over multiple messages).
The MEDIASRV process returns the ZSPI-TKN-CONTEXT token to indicate if it has
any additional response records available. The requester sends the original command
message (and the ZSPI-TKN-CONTEXT token that was returned by MEDIASRV) back
to the MEDIASRV process, then returns any additional response records.