TS/MP Management Programming Manual (G06.24+, H06.03+)
Server Class DEFINE Examples
NonStop TS/MP Management Programming Manual—540082-001
16-4
Obtaining Server Class DEFINE Information
Example 16-2. INFO SCDEFINE Programming Example (page 1 of 2)
?TACL MACRO
#FRAME
== First load the SPI token definition files "ZPWYTACL" and "ZSPITACL".
== These files are usually located on $DSV.ZSPIDEF.
#PUSH X^ Y^ == variable to load definition files into. This prevents
== TACL from running out of segment space.
#LOAD/LOADED X^/ ZPWYTACL
#LOAD/LOADED Y^/ ZSPITACL
== Define a structure to hold the DEFINEs that are sent to PATHMON and
== received from PATHMON. The DEFINEs must be saved into the buffer prior
== to sending to PATHMON. The SDlength field of the struct will store the
== length of the DEFINE for PATHMON. The array size of 952 bytes is based
== on Pathmon's maximum saved DEFINE length.
==
== The "saved^define" structure is used to get the DEFINE information from
== the DEFINE buffer so it can be restored to the TACL working set.
[#DEF saved^define STRUCT
BEGIN
INT S^Define( 0: 475 );
END;
] == end #def saved^define
== The "define^buf" structure is used to get the DEFINE info from
== PATHMON’s reply buffer.
[#DEF define^buf STRUCT
BEGIN
INT SDLength;
INT S^Define( 0: 475 );
END;
] == end #def define^buf
== Define the SPI request buffer.
[#DEF spi^request^buf struct like zpwy^ddl^msg^buffer;]
== Define the SPI reply buffer.
[#DEF spi^reply^buf struct like zpwy^ddl^msg^buffer;]
== Set the ssid (subsystem ID) value, which tells SPI what product your
== system is interfacing with and the version of that product.
#SET zpwy^val^ssid [zspi^val^tandem].[zspi^ssn^zpwy].[zpwy^val^version]
== Execute SSNULL and SSINIT functions to set up the request buffer.
#SSNULL zpwy^map^sel^scdefine zpwy^ddl^sel^scdefine
#SSINIT /TYPE 0/ spi^request^buf [zpwy^val^ssid] &
[zpwy^cmd^info] /OBJECT [zpwy^obj^scdefine]/
#SSINIT /TYPE 0/ spi^reply^buf [zpwy^val^ssid] &
[zpwy^cmd^info] /OBJECT [zpwy^obj^scdefine]/