TS/MP 2.5 Management Programming Manual
Example 7 ADD SCDEFINE Programming Example
?TACL MACRO
#FRAME
== First load the SPI token definition files "ZPWYTACL" and "ZSPITACL".
== These files are usually found 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
== Add the DEFINE with its specific attributes to the TACL working set.
#DEFINESETATTR CLASS MAP
#DEFINESETATTR FILE $PQA3.MZDEFTST.DEFOUT
#DEFINEADD =<definename> 1
== 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 length of the DEFINE
== string that will be passed to PATHMON.
[#DEF saved^define STRUCT
BEGIN
INT S^Define( 0: 475 );
END;
] == end #def saved^define
== The "define^buf" structure is used to pass the DEFINE info to PATHMON.
[#DEF define^buf STRUCT
BEGIN
INT SDLength;
INT S^Define( 0: 475 );
END;
] == end #def define^buf
#SET define^buf
== Save the DEFINE and put it in saved^define buffer. Definesave returns the
== result of the function and the length of the DEFINE.
#PUSH define^len
#SETMANY _ define^len, [#DEFINESAVE =<definename> saved^define]
== Put the length and saved DEFINE in one buffer.
#SET define^buf:SDLength [define^len]
#SETBYTES define^buf:s^define(0:475) saved^define:s^define(0:475)
== 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;]
344 Server Class DEFINE Examples










