NetBatch Management Programming Manual
NetBatch Procedure Calls
NetBatch Management Programming Manual—522462-003
7-25
Sample COBOL Program
*===============================================================*
*
*
* This section:
*
*
*
* a) Submits the job to NetBatch,
* b) Interprets any errors returned by the scheduler.
*
*
*===============================================================*
* Submit the job.
* Note: RT-TIME and NB-JOB-NUM are returned values for Submit
ENTER TAL "NB^JOB^SUBMIT" USING SUBMIT-REC
BASE-DATE
MASTERS-ARRAY
PURGE-TEST-FLAG
TIME-REC
RT-TIME
ALTER-FLAG
OPEN-T
NB-JOB-NUM
ATT-SET
GIVING W02-ERROR-NUM.
IF W02-ERROR-NUM NOT = 0
DISPLAY " "
DISPLAY " Error " W02-ERROR-NUM " encountered."
END-IF.
IF NB-JOB-NUM NOT = 0
PERFORM D000-RESULTS
END-IF.
C000-EXIT.
EXIT.
/
D000-RESULTS SECTION.
*===============================================================*
*
*
* This section:
*
*
*
* a) Displays the job name and number on the screen if
* the submit was successful.
*
*
*
*===============================================================*
* Display job number and name
MOVE NB-JOB-NUM TO W02-DISPLAY-NUM.
(continued)