OSI/AS Management Programming Manual
Management Program Example
Sample Programs
056785 Tandem Computers Incorporated C–11
CALL Write( Term^fn,
Objectnm6 [1],
Objectnm6 [0] );
END; -- case
-- Count number of OBJNAME tokens in response.
token^id := zCom^tkn^ObjName;
SSErr := SSGetTkn( Spi^Buffer,
zSpi^Tkn^Count,
token^id,
1,
ObjName^Count );
IF (SSErr <> zSpi^Err^OK) THEN CALL Debug;
-- Retrieve the OBJNAME tokens and print them.
--
FOR ObjName^Index := 1 TO ObjName^Count DO
BEGIN
SSErr := SSGetTkn( Spi^Buffer,
zCom^tkn^ObjName,
ObjName,
ObjName^Index );
IF (SSErr <> zSpi^Err^OK) THEN
CALL Debug;
-- Display object names on terminal.
CALL Write( Term^fn,
ObjName[1],
Objname[0] );
END; -- for Objname^Index
-- Get return token.
SSErr := SSGetTkn( Spi^Buffer,
zSpi^Tkn^RetCode,
RetCode );
IF (SSErr <> zSpi^Err^OK) THEN CALL Debug;
-- Get end-list token to close response record.
SSErr := SSGetTkn( Spi^Buffer,
zSpi^Tkn^EndList );
IF (SSErr <> zSpi^Err^OK) THEN CALL Debug;
END; -- for DataList^Index
--
-- Copy the context token from the response
-- to the saved request buffer.
--
SSErr := SSMoveTkn( zSpi^Tkn^Context,
Spi^Buffer, 1,
Spi^Buffer^Copy, 1 );
IF ( SSErr = zSpi^Err^OK ) THEN
--
-- There is a context token. Its presence
-- means there is more information to come.
-- We must resend the message to the subsystem
-- with the context token.