NetBatch Management Programming Manual

Sample Programs
NetBatch Management Programming Manual522462-003
C-16
Sample COBOL Program
Step 4: Change Class Name
Change class name CLASS-A to that of an existing class in $ZBAT if class CLASS-A
does not exist in that scheduler. Otherwise, add class CLASS-A to $ZBAT.
*CHANGE /"CLASS-A"/"OPERATIONS"/ ALL
904 MOVE "OPERATIONS" TO ZCLASSNAME OF ZBAT-DDL-
DEF-JOB.
Step 5: Change Job Name
Change job name MASTER-A to your own choice of name if MASTER-A conflicts with
an existing production job in $ZBAT. Otherwise, delete job MASTER-A from $ZBAT.
*CHANGE /"MASTER-A"/"COBOL85-JOB"/ ALL
813 STRING "COBOL85-JOB" DELIMITED BY SIZE
Step 6: Compile the Source File
End the EDIT session and compile the source file:
*EXIT
> COBOL85 /IN TEMP.COBSRC/ TEMP.COBOBJ; SUPPRESS
Step 7: Test the Program
Test the program by running the compiled object:
> RUN TEMP.COBOBJ
Job submitted to $ZBAT using SPI
Job number : 6
Job name : COBOL85-JOB
Job status from $ZBAT using SPI
Selpri : 3
Class : OPERATIONS
Step 8: Delete the Submitted Job
> BATCHCOM $ZBAT; DELETE JOB COBOL85-JOB
Job COBOL85-JOB Jobnumber 6 deleted