OSI/AS Management Programming Manual
Management Program Example
Sample Programs
056785 Tandem Computers Incorporated C–9
 CALL ShiftString
 (s^term^buf, Character^Count, 0);
 IF (Character^Count > 0) THEN
 BEGIN
 Osi^Mgr^Name[0] := Character^Count;
 Osi^Mgr^Name[1] ':=' s^Term^buf FOR
 Character^Count BYTES;
 S^Mgr^Tkn^Name[10] ':=' Osi^Mgr^Name[1]
 FOR Osi^Mgr^Name[0] BYTES;
 got^it := zSpi^Val^True;
 END;
 END;
 END; -- while
END; -- PROC Get^OsiM^Name
? PAGE "GetResponse^Loop"
-------------------------------------------------------------
--
-- GETRESPONSE^LOOP - Get responses from OSI/AS continuously
-- by sending the command with the context token, until
-- there is no context token in the response buffer.
--
-- GLOBALS: Spi^Buffer
-- Spi^Buffer^Copy
-- SSErr
-- RetCode
-- Term^fn
-- Term^Buf
-- INPUT: None
-- OUTPUT: None
--
-------------------------------------------------------------
INT PROC GetResponse^Loop;
BEGIN
 INT Object^type; -- value of zCom^Tkn^Objtype
 INT .ObjName [0:132]; -- value of zCom^Tkn^ObjName
 INT ObjName^Count; -- count of zCom^Tkn^ObjName
 INT ObjName^Index; -- index to get zCom^Tkn^ObjName
 INT DataList^Count; -- count of zSpi^Tkn^DataList
 INT DataList^Index; -- index of zSpi^Tkn^DataList
 INT complete; -- flag for continuation
 INT(32) token^id; -- token code for zSpi^Tkn^Count
 INT .Objectnm1 [0:3] := [6, "SUBSYS"];
 INT .Objectnm2 [0:4] := [7, "SERVICE"];
 INT .Objectnm3 [0:4] := [7, "PROCESS"];
 INT .Objectnm4 [0:4] := [7, "PROFILE"];
 INT .Objectnm5 [0:3] := [5, "ENTRY"];
 INT .Objectnm6 [0:10] := [19, "UNKNOWN OBJECT TYPE "];
 -- Save the original command.
 Spi^Buffer^Copy ':=' Spi^Buffer FOR










