OSI/AS Management Programming Manual

Appendix C Sample Programs
056785 Tandem Computers Incorporated C–1
This appendix includes a sample management program for C-series systems that
sends commands to the OSI/AS subsystem, four sample event-message filters for
users of OSI/AS, and a sample program that retrieves event messages generated by
OSI/AS.
Source code files for all the examples described in this appendix are provided as part
of the OSI/AS software. They reside (by default) in the volume and subvolume
$SYSTEM.ZOSIAS.
Management Program
Example
The following pages present a management program, coded in TAL, that sends
commands to the OSI/AS subsystem to do the following:
Prompts you for the name of your OSI/AS subsystem
Adds an L4 PROFILE called TSPTFILE to the MIB
Lists the name of the SUBSYS object (the OSI manager process name)
Lists the names of all the objects in this OSI/AS subsystem (including the name of
the L4 PROFILE just added)
The source code file for this example is provided as part of the OSI/AS software. It
resides (by default) in $SYSTEM.ZOSIAS.EXSPIT1.
Before running this program, you must set up your OSI/AS subsystem. Note that if
your initial subsystem already includes a PROFILE named #L4.TSPTFILE, the
program does not add another one; it prints a message and continues with the next
task.
-------------------------------------------------------------
--
-- File: EXSPIT1
--
-- This program communicates with an OSI/AS subsystem
-- through SCP, sending the following commands to the OSI
-- manager process:
--
-- * ADD PROFILE #L4.TSTPFILE
-- * LISTOBJECTS SUBSYS, SUB NONE
-- * LISTOBJECTS NULL
--
-------------------------------------------------------------
? SYMBOLS, INSPECT
? NoMap, NoCode
? PAGE "Global literals, defines "
--
-- Global literals, defines
--
-- Note: The following SOURCE statements assume that before
-- compilation, a VOLUME or ASSIGN command has been entered
-- from the TACL command interpreter to point to the correct
-- subvolumes for the SPI definition files.