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

Management Programming Examples
NonStop TS/MP Management Programming Manual540082-001
15-2
Configuring Pathway
Example 15-1. TS/MP Configuration Program (page 1 of 28)
* NB: Pathmon requires that SPI clients be low-pin or be named. Set the
appropriate linker flag.
* The source search path must include the ZSPIDEFS subvolume.
* To compile from Guardian, add this define; it must name the subvolume of the
SPI source files.
* ADD DEFINE =_SOURCE_SEARCH, CLASS SEARCH, SUBVOL0 ($system.zspidef)
* On TNS/E, use this command:
* ECOBOL /IN <source>/ <program> ;SUPPRESS;RUNNABLE;ELD (-SET RUNNAMED ON)
* For TNS COBOL, add this define. It must name the subvolume of the COBOL
library files.
* ADD DEFINE =_OBJECT_SEARCH, CLASS SEARCH, SUBVOL0 ($system.system)
* COBOL /IN <source>/ <program> ;SUPPRESS;ENV COMMON,CONSULT COBOLEX0;SEARCH
CLULIB;SEARCH COBOLLIB
IDENTIFICATION DIVISION.
PROGRAM-ID. PATHWAY-SPI-EXAMPLE.
?SAVE STARTUP
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. HP-NONSTOP.
OBJECT-COMPUTER. HP-NONSTOP.
SPECIAL-NAMES.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT PATHMON-FILE ASSIGN TO #DYNAMIC.
DATA DIVISION.
FILE SECTION.
FD PATHMON-FILE.
COPY ZPWY-DDL-MSG-BUFFER IN "ZPWYCOB".
WORKING-STORAGE SECTION.
01 MISCELLANEOUS.
05 WS-RETURN-CODE NATIVE-2 VALUE 0.
88 OK-TO-CONTINUE VALUE 0.
88 EOF-HIT VALUE 1.
88 NOT-OK-TO-CONTINUE VALUE 9999.
05 WS-VOLUME-PORTION PIC X(30) VALUE "VOLUME ".
05 WS-STARTUP-VOLUME PIC X(28).
05 WS-STARTUP-VOLUME-LEN PIC 9(4) COMP VALUE 0.
05 WS-FIRST-OCCURRENCE PIC S9(4) COMP VALUE 1.
* The following declarations facilitate handling Boolean values
* in COBOL. When a Boolean value is required, the program
* references the alphanumeric fields. For more information, see
* the Distributed Systems Management (DSM) Programming Manual.