DSM/Tape Catalog Management Programming Manual
Communicating With MEDIASRV
DSM/Tape Catalog Management Programming Manual—520481-003
2-9
Sending Commands and Retrieving Responses
Sending Commands and Retrieving 
Responses
Management applications prepare SPI buffers by using the standard SPI procedures. 
After opening a MEDIASRV process for SPI-formatted messages, the applications use 
the WRITEREAD procedure to send the command buffers and retrieve the 
corresponding responses. For a description of this process, see the Distributed 
Systems Management (DSM) Manual.
Stopping a MEDIASRV Process
A MEDIASRV process can stop itself. How and when it does this depends on the value 
of the AUTOSTOP MEDIASRV process execution parameter specified when the 
MEDIASRV process is started. See the description of this parameter in Starting a 
MEDIASRV Process Using the RUN Command on page 2-2.
A MEDIASRV process can also be stopped by a STOP command from a command 
interpreter such as TACL, a PROCESS_STOP_ procedure call, or a STOP or ABORT 
SPI command from a management process.
Abnormal Process Termination
In the case of any of these failures, part or all of a pending command might be 
executed. After starting another MEDIASRV process, you or your application should 
check the status of objects that might have been affected by the command. Associated 
error and event messages can help you determine the cause of the problem.
•
If a non-fault-tolerant MEDIASRV fails while it is processing a command, the 
WRITEREAD call issued by a requesting application returns file-system error 201.
•
If an application opens a fault-tolerant MEDIASRV with sync-depth equal to 0, 
and if the primary process is stopped or its CPU fails, the application’s 
WRITEREAD procedure call returns file-system error 201.
•
If an application opens a fault-tolerant MEDIASRV process with sync-depth 
equal to 1, and if the primary process is stopped or its CPU fails, the backup 
process takes over, and the command message is reprocessed. Reprocessing the 
command can result in errors because part or all of the command might have been 
executed before the backup takeover.
•
If a management application starts a MEDIASRV process that subsequently stops 
abnormally, the operating system sends system message –101 to the application. 
For more information, see the descriptions of the FILE_OPEN_ procedure 
discussion in the Guardian Procedure Calls Reference Manual. For file-system 
error descriptions, see the Operator Messages Manual.










