NetBatch Management Programming Manual

Sample Programs
NetBatch Management Programming Manual522462-003
C-41
Sample TAL Program
Sample TAL Program
Example C-4 on page C-42 contains the source code for a sample TAL program. The
program submits a job to a scheduler, executes a STATUS JOB command on the
submitted job, and displays some job details. The source code for the program is
available in the file NBSPIEX in the NetBatch installation subvolume.
To run the sample program, follow these steps. The prerequisite to completing the
procedure is 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 $SYSGEN.ZNETBTCH.NBSPIEX 1525/1826 PUT
TEMP.TALSRC
TEXT EDITOR - T9601D20 - (01JUN93)
CURRENT FILE IS $DATA7.TEMP.TALSRC
Step 2: Change ISV.ZSPIDEF References
Change ISV.ZSPIDEF references in the new file to specify the volume and subvolume
containing the source-definition files ZSPITAL and ZBATTAL:
*LIST BOTH /ISV.ZSPIDEF/
1529 ?NOLIST, SOURCE $ISV.ZSPIDEF.ZSPITAL
1532 ?NOLIST, SOURCE $ISV.ZSPIDEF.ZBATTAL
*CHANGE /ISV/SYSGEN/ ALL
1529 ?NOLIST, SOURCE $SYSGEN.ZSPIDEF.ZSPITAL
1532 ?NOLIST, SOURCE $SYSGEN.ZSPIDEF.ZBATTAL
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
1674 job.zclassname ':=' "OPERATIONS
"; -- Class name
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"/"TAL-JOB"/ ALL
1639 work^area ':=' "TAL-JOB" -> @ptr;