TS/MP 2.5 Management Programming Manual

WHEN ZPWY-VAL-OK
SET OK-TO-CONTINUE TO TRUE
WHEN ZPWY-ERR-PM-EOF
SET NOT-OK-TO-CONTINUE TO TRUE
WHEN OTHER
SET NOT-OK-TO-CONTINUE TO TRUE
* CALL PATHWAY-SPI-ERROR IN PATHWAY-UTILITIES
* USING ZPWY-DDL-MSG-BUFFER
ENTER TAL "DEBUG"
END-EVALUATE
END-IF
.
3900-CHECK-COBOL-ERROR.
IF WS-COBOL-RESULT IS NOT ZERO THEN
DISPLAY "COBOL UTILITY ERROR: "
WS-COBOL-RESULT
SET NOT-OK-TO-CONTINUE TO TRUE
END-IF
.
4000-CHECK-SUBSYSTEM-ERROR.
IF WS-SS-RESULT IS NOT ZERO THEN
DISPLAY "SS ERROR: "
WS-SS-RESULT
ENTER TAL "DEBUG"
SET NOT-OK-TO-CONTINUE TO TRUE
END-IF
.
Adding or Altering a Server
Example 4 (page 336) presents a management program that opens a Pathway subsystem and issues
an ADD SERVER or ALTER SERVER command. The example is a TACL macro written as a SPI
requester and:
1. Determines whether the PATHMON process name and server name are supplied and checks
that the names, as well as the command, are in a valid format.
2. Calls routines to ensure that the PATHMON process name, server name, and the command
are entered.
3. Loads the ZSPITACL and ZPWYTACL token definitions.
4. Defines the SPI buffer.
5. Sets the SSID value.
6. Initializes the buffer and the selector token.
7. Loads the buffer.
8. Opens the Pathway subsystem, sends and receives the buffer, and closes the buffer.
9. Displays the results by extracting ZPWY-DDL-SEL-SC from the response buffer and displaying
its contents.
To use this example in your own environment, you must supply the Pathway subsystem name (that
is, $PM), the command you want to perform, and the server class name.
Adding or Altering a Server 335