NetBatch Management Programming Manual

NetBatch Procedure Calls
NetBatch Management Programming Manual522462-003
7-27
Sample TAL Program
Sample TAL Program
Example 7-3 on page 7-28 contains the source code for a sample TAL program that
demonstrates the use of NB^JOB^SUBMIT. The program uses NB^JOB^SUBMIT to
submit a job to a scheduler, displays some of the job’s details, and handles error
conditions. All instances of WAIT-TIME or START-TIME must be unsigned numerics.
The source code for the program is available in the file NBSPIEX in the NetBatch
installation subvolume.
To run the sample program, you need a D21 or later scheduler named $ZBAT running
on the node where the program will run.
Step 1: Copy the Source Code
Copy the source code for the sample TAL program from file NBSPIEX to a new EDIT
file:
> EDIT; GET NBSPIEX 2403/2756 PUT TEMP.NBTALSRC
TEXT EDITOR - T9601D20 - (01JUN93)
CURRENT FILE IS $DATA7.TEMP.NBTALSRC
Step 2: Change SYSTEM.SYSTEM References
Change SYSTEM.SYSTEM references in the new file to specify the volume and
subvolume containing the NetBatch library file BATCHLIB:
*LIST BOTH /SYSTEM.SYSTEM.BAT/
2608 ?SEARCH $SYSTEM.SYSTEM.BATCHLIB
*CHANGE /SYSTEM.SYSTEM.BAT/SYSTEM.SYS00.BAT/ ALL
2608 ?SEARCH $SYSTEM.SYS00.BATCHLIB
Step 3: 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
2681 submit^rec.job^details.jclass ':='
"OPERATIONS ";
Step 4: 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 "/"NBJS-TAL-JOB
"/ ALL
2667 submit^rec.actual^job^name ':='
"NBJS-TAL-JOB ";