Skip to main content

 There are several ways to submit JCL to the Internal Reader. One can use a submission from CICS or from a batch job using a JCL file. If one has many different JCL jobs stored in different datasets, it can be a lot of work to merge them into a single JCL stream. Is there another way to do this to avoid the manual work of merging JCL files?


  The following sample describes submission of multiple batch jobs using JCL from different datasets. The sample uses a QSAM dataset and two PDS's. Each JCL is submitted from an IEBGENER step in the 'main' JCL.
 
 The sample was built using Enterprise Developer v2.2. The datasets containing the JCL to be executed were added to the Catalog with these DCB attributes:
 
   Sequential dataset: DCB=DSORG=PS,RECFM=LSEQ,LRECL=80,BLKSIZE=0
 
   PDS one: DCB=DSORG=PO,RECFM=LSEQ,LRECL=80.BLKSIZE=0
 
   PDS two: DCB=DSORG=PO,RECFM=LSEQ,LRECL=80.BLKSIZE=0
 
 The PDS's were marked as Dynamic with a file extension of JCL so any JCL file added to the directory defining the PDS will automatically become a new member and could be used in another JCL step. These attributes can be viewed in the Catalog by clicking on the DCB link once the sample region has been imported to your selected location.
 
 To review or run the sample, unzip the attachment to a test directory. It contains a region export that used c:\\a1\\intrdr as it System Directory so if one imports this region to another path, then the path should be changed to use your new definition both in the System Directory and in the [ES-Environment] section on the same web page.
 
 The sample has had its console.log file renamed to console-log.txt for viewing by any text editor and so the original will not be lost once the new test region is started. When reviewing the console log, you will notice that the 'main' JCL started JOB 1000. It was submitted and started but the other jobs were only submitted. Jobs 1001, 1002 and 1003 were not started until job 1000 ended. This is normal and ensures resources are available when a job starts. This example only illustrates the process of executing JCL, not resource use for job steps.
 
 The directory named JCL contains the SUBIR.JCL file and three sub-directories. SUBIR.JCL is the only JCL that is submitted via ESMAC. It will submit the other jobs via the Internal Reader. 

 IntRdr.Zip


#MFDS
#EnterpriseDeveloper