OSI/TS Management Programming Manual

Appendix C Sample Programs
056786 Tandem Computers Incorporated C–1
This appendix includes a sample management program for C-series systems that
sends commands to the OSI/TS subsystem, two sample event-message filters for users
of OSI/TS, and a sample program that retrieves event messages generated by OSI/TS.
Source code files for all of the examples described in this appendix are provided as
part of the OSI/TS software. They reside (by default) in the volume and subvolume
$SYSTEM.ZOSITS. You can modify the source code as needed to fit your
environment, then compile it and run the resulting object code.
Management Program
Example
The following pages present a management program, coded in TAL, that sends
commands to the OSI/TS subsystem to do the following:
Add two subdevices named $TT01.#S6000 and $TT01.#S6001
Start all subdevices whose names match the wild-card name $TT01.$S*
Get the status of all subdevices whose names match the wild-card name $TT01.$S*
The source code file for this example is provided as part of the OSI/TS software. It
resides (by default) in $SYSTEM.ZOSITS.EXSPIT1. You can modify the source code as
needed and compile it. Before running the resulting object code, you must ensure that
SCP (the $ZNET process) is running.
! ***********************************************************
! * *
! * File: EXSPIT1 *
! * *
! * This program demonstrates how an application *
! * sends commands to and retrieves responses from the *
! * OSI/TS subsystem, through SCP. It sends the *
! * following commands: *
! * *
! * * ADD SU *
! * * START SU with the wild-card option *
! * * STATUS SU with the wild-card option *
! * *
! * To run this program, do the following: *
! * *
! * 1. Create a TSP process named $TT01. *
! * 2. Run the object file of EXSPIT1. *
! * *
! ***********************************************************
?symbols, inspect
?nocode, nomap, nolmap
! ***********************************************************
! * Global declarations and definitions *
! ***********************************************************
! SPI standard definitions
?nolist, source $system.zspidef.zspital
?list