Subsystem Control Point (SCP) Management Programming Manual

Communicating With an SCP Process
Subsystem Control Point (SCP) Management Programming Manual520619-001
2-12
Opening an SCP Process
Opening an SCP Process
To send SPI commands to an SCP process, the process must be opened using the #ZSPI
qualifier; in other words, the SCP process name must be specified as $process-
name.#ZSPI. If, for example, the SCP process name is $ZNET, your application
would open it as $ZNET.#ZSPI. The #ZSPI qualifier indicates to the SCP process that
subsequent messages from this process will follow the SPI protocol.
The only open parameter that might be required is sync-depth, which is specified
when the SCP process is fault tolerant. If sync-depth is specified with a value greater
than 0 and an SCP process fails while the SCP process is executing a command, the
command is automatically processed again. When this happens, it is possible that part or
all of the command has been executed—particularly when a command is directed at
more than one object. Therefore, sending the command again can produce an error. For
example, if the command changed one or more object summary states before being
cancelled, a subsequent command might produce an error (perhaps ZCOM-ERR-OBJ-
ALRDY-IN-SUMSTATE) because the summary states of some of the objects have been
changed and are not as expected. The recommended value for sync-depth is 1.
If the SCP process is not fault tolerant and an SCP process failure affects your
command, the Guardian WRITEREAD procedure that sent the command returns file-
system error 201. To retry the command, use another SCP process.
SCP processes accept opens from backup processes, so you can design fault-tolerant
management applications.
For more information, see the descriptions of the OPEN and FILE_OPEN_ procedures
in the Guardian Procedure Calls Reference Manual and the Guardian Programmer’s
Guide.
Sending Commands and Retrieving Responses
Management applications prepare SPI buffers by using the standard SPI procedures.
After opening an SCP 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.
Note. Do not confuse the open described here with the open described in Starting an SCP
Process Using the PROCESS_CREATE_ Procedure on page 2-7. This open is for using the
SPI interface to exchange messages; the other open is only for sending a startup message to
a newly created SCP process. Once the startup message is acknowledged, the SCP process
must be closed, and the process reopened for management as described here.