TS/MP Management Programming Manual (G06.24+, H06.03+)

Management Programming Examples
NonStop TS/MP Management Programming Manual540082-001
15-36
Obtaining Subsystem Information
8. Displays the results by extracting ZPWY-DDL-DEF-PATHWAY from the response
buffer and displaying its contents
This example calls the source file ASCICONV, which contains a routine to convert
integers to strings, used to display things like error numbers. This source file is shown
in Example 15-4.
Supply the Pathway subsystem name (that is, $PM) in this example.
Example 15-3. Obtaining Subsystem Information Program Example (page1of2)
?TACL MACRO
#FRAME
[#PUSH X^ Y^ == variables for zspi and zpwy ddls
read^err io^err reply request == #requester variables
pmon^name == pathmon name from input parameter
result^1 == contains result of ssget operation
result^2 == contains # of tokens ssget returned
result^3 == contains ssget pathway error
] == end push
== Make sure the PATHMON name is provided and that is starts with a "$".
[#IF [#EMPTY %1%] |THEN|
#OUTPUT You must enter the Pathmon name $...
|ELSE|
#SET pmon^name %1%
[#IF NOT [#MATCH [#CHARFIND pmon^name 1 $] 1] |THEN|
#OUTPUT The Pathmon name must start with a "$"......
|ELSE|
== Load the ZSPITACL and ZPWYTACL token definitions. These definitions
== can also be loaded into a TACL SEGMENT file and attached to the users’
== environment. This saves considerable time if this macro is used
== regularly. The files ZSPITACL and ZPWYTACL must reside on $DSV.ZSPIDEF.
[#IF NOT ([#FILEINFO/ EXISTENCE / $SYSTEM.ZSPIDEF.ZSPITACL] AND
[#FILEINFO/ EXISTENCE / $SYSTEM.ZSPIDEF.ZPWYTACL]) |THEN|
#OUTPUT *ERROR* Unable to load ZPWYTACL or ZSPITACL definition files..
#OUTPUT *ERROR* Insure that these files reside on $SYSTEM.ZSPIDEF.....
|ELSE|
#OUTPUT Loading ZSPITACL DDL
#LOAD / LOADED X^ / $SYSTEM.ZSPIDEF.ZSPITACL == copy tacl spi ddl defs
#OUTPUT Loading ZPWYTACL DDL
#LOAD / LOADED Y^ / $SYSTEM.ZSPIDEF.ZPWYTACL == copy tacl pwy ddl defs
== Define the SPI buffer.
[#def spi^buf struct like zpwy^ddl^msg^buffer;]
== Set the SSID value, which tells SPI what product you are interfacing
== with.
#SET zpwy^val^ssid [zspi^val^tandem].[zspi^ssn^zpwy].[zpwy^val^version]