OSI/AS Management Programming Manual

Management Program Example
Sample Programs
C–2 056785 Tandem Computers Incorporated
--
-- SPI TAL definitions
? NOLIST, SOURCE $dsv.zspidef.zSpiTAL
? LIST
-- Data communications TAL definitions
? NOLIST, SOURCE $dsv.zspidef.zComTAL
? LIST
-- OSI/AS subsystem-specific TAL definitions
? NOLIST, SOURCE $dsv.zspidef.zOsiTAL
? LIST
? PAGE "Global variables "
--
-- Tandem data communications variables
--
--
-- Declare a variable to hold the subsystem ID of the OSI/AS
-- subsystem, initializing it with the proper values.
--
INT .Osi^Val^ssid[0:5] :=
[ zSpi^Val^Tandem,
zSpi^SSN^zOsi,
zOsi^Val^Version ];
--
-- This program attempts to add a PROFILE object to the
-- OSI/AS subsystem. Define the structure for the profile
-- information and the token map for the structure.
--
STRUCT .Add^Prof^L4 ( zOsi^DDL^Add^Prof^L4^def );
INT .Add^Prof^L4^map [ 0:zOsi^Map^Add^Prof^L4^wln-1 ] :=
zOsi^Map^Add^Prof^L4;
--
-- Output file variables:
--
INT .Term^name [0:11]; -- terminal name: output file
INT Term^fn; -- terminal file number
INT .Term^buf [0:39]; -- buffer for terminal I/O
--
--
--
INT .Osi^Mgr^Name[0:10]; -- OSI manager name
INT .Mgr^Tkn^Name [0:16] :=
[32, "\ "];
-- 12345678901234567890123456789012
STRING .S^Mgr^Tkn^Name := @Mgr^Tkn^Name '<<' 1;
--
-- SPI communication variables
--
-- Define two buffers for the SPI messages.
-- One will hold the request and response. The other
-- will hold a copy of the request, so that we can resend