OSI/AS Management Programming Manual

Management Program Example
Sample Programs
056785 Tandem Computers Incorporated C–3
-- the original with any context that we may receive
-- in the response.
--
-- Our buffers will be the minimum size for communication
-- with the OSI/AS subsystem. We declare the buffer as an
-- array of words, so we must divide the minimum byte
-- count by two.
--
INT .Spi^Buffer [0: (zOsi^Val^Min^BufLen/2) ];
-- spi request/reply Buffer Minimum size
INT .Spi^Buffer^Copy [0: (zOsi^Val^Min^BufLen/2) ];
-- backup spi Buffer for continuation
INT SCP^fn; -- SCP file number
--
-- Error values:
--
INT FS^Error := 0; -- File-system error code
INT RetCode := zCom^Err^OK; -- zSpi^Tkn^RetCode Value
INT SSErr := zSpi^Err^OK; -- error from SSxxx calls
--
-- Text messages:
--
-- Format: [<text-length>, "<text>"]
-- 1 2
-- 123456789012345678901234
INT .Message1 [0:18] :=
[36, "Enter the OSI Manager name please: "];
INT .Message2 [0:12] := [24, "-> LISTOBJECTS ^SUBSYS: "];
INT .Message3 [0:11] := [22, "-> LISTOBJECTS ^NULL: "];
INT .Message4 [0:11] := [22, "ZCom FILE SYSTEM ERROR"];
INT .Message5 [0:9] := [18, "SECURITY VIOLATION"];
INT .Message6 [0:10] := [19, "SPI RETRIEVAL ERROR"];
INT .Message7 [0:10] := [19, "-> ADD PROFILE DONE"];
INT .Message8 [0:14] :=
[27, "ZCom OBJECT ALREADY DEFINED"];
? PAGE "External Procedure Declarations"
--
-- External declarations for GUARDIAN 90 procedures
--
? NOLIST, SOURCE $system.system.extdecs( Close,
? Debug
? FileError,
? FileInfo,
? MyTerm,
? Open,
? Read,
? ShiftString,
? Stop,
? Write,
? WriteRead )
? LIST