NetBatch Management Programming Manual

NetBatch Procedure Calls
NetBatch Management Programming Manual522462-003
7-23
Sample COBOL Program
/
PROCEDURE DIVISION.
A000-MAINLINE SECTION.
PERFORM B000-SETUP.
PERFORM C000-SUBMIT.
STOP RUN.
A000-EXIT.
EXIT.
/
B000-SETUP SECTION.
*============================================================ *
*
*
* This section:
*
* a) Gets the StartUp text from the system to get the
*
* default Volume/subvolume,
*
* b) Sets up the attributes for the job to be submitted.
*
*
*
*============================================================ *
* Get Startup Text
ENTER "GETSTARTUPTEXT" USING W02-PORTION
W02-STARTUP-TEXT
GIVING W02-RESULT.
IF W02-RESULT = -1
MOVE W02-RESULT TO W02-ERROR-NUM
MOVE "GETSTARTUPTEXT FAILED" TO W02-ERROR-TEXT
ENTER TAL "PROCESS_STOP_" USING OMITTED
OMITTED
OMITTED
2
W02-ERROR-NUM
OMITTED
W02-ERROR-TEXT
END-IF.
(continued)