SNAX/APC Management Programming Manual
Programming Example
111813 Tandem Computers Incorporated B–5
END; ! of call^scp
?PAGE "PROC: BUILD^CMD"
! **************************************************************
! * build^cmd *
! **************************************************************
PROC build^cmd( cmd, obj^type );
INT cmd, ! the command number
obj^type; ! the object type
BEGIN
INT sserror; ! returned by call on SPI procedure
sserror := SSINIT( buffer, zapc^val^buflen, zapc^val^ssid,
zspi^val^cmdhdr, cmd,obj^type, 0 );
IF sserror THEN
CALL handle^spi^error( sserror ); ! error on the call
END; ! of build^cmd
?PAGE "PROC: START^LU"
! **************************************************************
! * start^lu *
! **************************************************************
PROC start^lu( obj^name );
INT .obj^name; ! the object name of the LU to be
! started
BEGIN
INT sserror, ! returned by call on SPI procedure
return^token; ! the value of the return token
! Initialize the command buffer
CALL build^cmd( zcom^cmd^start, zcom^obj^lu );
! Put the object-name token in the buffer
sserror := SSPUTTKN( buffer, zcom^tkn^objname, obj^name );
IF sserror THEN
CALL handle^spi^error( sserror ); ! error on the call
return^token := call^scp;
IF return^token <> zspi^err^ok THEN ! an error occurred
BEGIN
! Handle the possible errors for the START LU command.
END;
END; ! of start^lu
?PAGE "PROC: STOP^LU"
! **************************************************************
! * stop^lu *
! **************************************************************
PROC stop^lu(obj^name);