NetBatch Management Programming Manual
Sample Programs
NetBatch Management Programming Manual—522462-003
C-30
Sample TACL Macros
Sample TACL Macros
Example C-3 on page C-32 contains the source code for sample TACL macros. The
macros submit a job to a scheduler, execute a STATUS JOB command on the
submitted job, and display some of the job’s details. The source code for the macros is
available in the file NBSPIEX in the NetBatch installation subvolume.
To run the sample macros, follow these steps. The prerequisite to completing the
procedure is a D21 or later scheduler named $ZBAT running on the node where the
macros will run.
Step 1: Copy the Source Code
Copy the source code for the sample TACL macros from file NBSPIEX to a new EDIT
file:
> EDIT; GET $SYSGEN.ZNETBTCH.NBSPIEX 1101/1517 PUT
TEMP.TACLSRC
TEXT EDITOR - T9601D20 - (01JUN93)
CURRENT FILE IS $DATA7.TEMP.TACLSRC
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 ZSPISEGF and ZBATSEGF:
*LIST BOTH /ISV.ZSPIDEF/
1116 ATTACHSEG SHARED $ISV.ZSPIDEF.ZBATSEGF :zbat
1120 ATTACHSEG SHARED $ISV.ZSPIDEF.ZSPISEGF :spi
*CHANGE /ISV/SYSGEN/ ALL
1116 ATTACHSEG SHARED $SYSGEN.ZSPIDEF.ZBATSEGF :zbat
1120 ATTACHSEG SHARED $SYSGEN.ZSPIDEF.ZSPISEGF :spi
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
1351 #SET zbat^job^def:zclassname:z^c 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/TACL-JOB/ ALL
1260 #SET data^struct:data^area TACL-JOB