TS/MP 2.5 Management Programming Manual
[#IF ([result^3] > 0) |THEN|
#OUTPUT The [command^] command terminated with an
#OUTPUT Error **** [result^3] ****
SINK [#SSGET/ INDEX 1 /spi^buf zspi^tkn^errlist]
#SETMANY j^1 j^2 res^cmd, [#SSGET/ INDEX 1 /spi^buf
zpwy^tkn^reqcommand]
[#IF [#MATCH [res^cmd] [zpwy^cmd^add]] |THEN|
#OUTPUT ZPWY^TKN^REQCOMMAND = ZPWY^CMD^ADD
|ELSE|
#OUTPUT ZPWY^TKN^REQCOMMAND = ZPWY^CMD^ALTER
] == end if match res^cmd .....
#SETMANY j^1 j^2 res^obj, [#SSGET/ INDEX 1 /spi^buf
zpwy^tkn^reqobjecttype]
[#IF [#MATCH [res^obj] [zpwy^obj^sc]] |THEN|
#OUTPUT ZPWY^TKN^REQOBJECTTYPE = ZPWY^OBJ^SC
|ELSE|
#OUTPUT Unable to identify OBJECT TYPE.
] == end if match res^obj .....
|ELSE|
SINK [#SSGETV/ INDEX 1/ spi^buf zpwy^map^sel^sc
zpwy^ddl^sel^sc]
#OUTPUT The server name listed below is [command^]ED !!!
#OUTPUT
#OUTPUTV zpwy^ddl^sel^sc
] == end if result^3 > 0 .....
] == end if read^err .....
] == end if not fileinfo /existence/....
] == end if [r_format_server_name %3%] .....
] == end if [r_command_ok %2%] .....
] == end if r_valid_pmonname %1% .....
] == end if [empty %*%] .....
#UNFRAME
Obtaining Subsystem Information
Example 5 (page 340) presents a management program that issues an INFO PATHWAY command.
The example is a TACL macro written as an SPI requester, and:
1. Determines whether the PATHMON process name is provided, and checks that the name is
in a valid format.
2. Loads the ZSPITACL and ZPWYTACL token definitions.
3. Defines the SPI buffer.
4. Sets the SSID value.
5. Initializes the buffer and the ZPWY-DDL-STATUS-PATHWAY token.
6. Opens the Pathway subsystem, sends and receives the buffer, and closes the buffer.
7. Checks for Pathway subsystem errors.
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 6 (page 342).
Supply the Pathway subsystem name (that is, $PM) in this example.
Obtaining Subsystem Information 339










