BATSUB Utility

Overview

After getting the JES2 Mellon mods installed, I wanted some way to run a stream ("batch") of jobs simply, and preferably automatically (via a timed entry using the "ZTIMER" utility). While I'm sure there's already some solution that will do that for me, where's the fun in that!

Instead, I wrote my own "quick and dirty" tool to do it for me. The code for BATSUB is here: BATSUB.ASM. You will also need the macros included here: MACLIB.TXT (IEBCOPY format).

Functionality

BATSUB requires two pieces of input - 1., a "Job List" (sequential file) and 2., a "JCL Library" (PDS). For each job in the job list, the JCL library is searched and the records from that member are written to the internal reader.

The job list is specified as an FB80 file which is assigned to the DD "JOBLST". The first eight characters identify the job, and the rest of the record is treated as a comment.

The JCL library is a PDS, FB80, which contains individual jobs as members, which are searched by BATSUB.

The easiest way to invoke BATSUB is by running it with the "START" command, using a PROC. Something like below:

//BATSUB   PROC PFX='DEVL.ALL',LIST=
//BATSUB   EXEC PGM=BATSUB
//STEPLIB    DD DSN=DEVL.ALL.LOADLIB,DISP=SHR
//JCLLIB     DD DSN=&PFX..JCLLIB,DISP=SHR
//JOBLST     DD DSN=&PFX..PARMLIB(&LIST),DISP=SHR
//INTRDR     DD SYSOUT=(A,INTRDR)

You can then invoke it something like `S BATSUB,LIST=BATCH1`, where "BATCH1" is a member in the PARMLIB which specifies a list of jobs in JCLLIB to be submitted.

Notes

To allow an arbitrary list of members to be accessed from the JCLLIB PDS, BPAM is used. Because of this, the members have to be read block-wise rather than using the simpler record-driven QSAM "GET" macros.

I've used the "FIND" macro to locate each member within the PDS. From what I've read, I believe it would be better/faster to use a BLDL instead - but I can't imagine the benefit will be particularly meaningful for this specific use-case.

There is no sort of completion checking, the intention is that you rely on /*BEFORE or /*AFTER cards to manage this.


Back | Home