SNAX/APC Management Programming Manual

Programming Example
111813 Tandem Computers Incorporated B–7
END; ! of alter^lu
?PAGE "PROC: INFO^LU"
! **************************************************************
! * info^lu *
! **************************************************************
PROC info^lu( obj^name );
INT .obj^name; ! the object name of the LU whose
! attribute values are to be returned
BEGIN
INT sserror, ! returned by call on SPI procedure
return^token; ! the value of the return token
INT(32) tkn^code := zapc^tkn^sess^lim;
INT tkn^value;
! Initialize the command buffer
CALL build^cmd( zcom^cmd^info, 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 INFO LU
! command and exit this procedure.
RETURN;
END;
! Get the value of zapc^tkn^tndmname token.
sserror := SSGET( buffer, tkn^code, tkn^value, 1 );
IF sserror THEN
CALL handle^spi^error( sserror ); ! error on the call
END; ! of info^lu
?PAGE "MAIN: M"
! **************************************************************
! * main program *
! **************************************************************
PROC m MAIN;
BEGIN
INT error, ! error upon opening SCP
obj^name[0:127]; ! the object name
! Open SCP.
error := open^scp;
IF error THEN CALL DEBUG;