I have a requirement wherein I have to submit 10 JCL's. Every JCL is coded to give MAXXCC=0 when completed good.
I want to call all the JCL's from a main JCL so that I don't have to submit all the JCL's manually.
If this is not possible through internal reader, please suggest any other workaround.
THIS IS HOW I CODED THEM CURRENTLY:
//*************************************************************
//* STEP 1: Run job 2
//*************************************************************
//*
//STEP02 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=HLQ.MYPDS(JCL2)
//SYSUT2 DD SYSOUT=(,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//*************************************************************
//* STEP 3: Run job 3
//*************************************************************
//*
//STEP03 EXEC PGM=IEBGENER,COND=(0,EQ,STEP0)
//SYSUT1 DD DISP=SHR,DSN=HLQ.MYPDS(JCL3)
//SYSUT2 DD SYSOUT=(,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
Scheduling System
As other suggested use the scheduling system, I would think all mainframe systems would have some sort of scheduler. Running Jobs in sequence is there bread and butter of Scheduling systems.
You do need to learn about
scheduling systems
and the sooner the better. Ask at work !!!Other options do exist
JCL Chaining - Each job submit the next job
Basically you can have each job submit the next job e.g.
Job 1:
Job 2:
If you use this method I would create a JCL proc (say SUBNEXT)
You can use the JCLLIB statement to use your own
PROCLIB
(PDS where you store SUBNEXT). To use JCLLIB:Jes 3 scheduling
If using Jes-3; There is in-built job control. Only use this option if you know what you are doing other wise the operation staff will get upset. Basically make sure you use the flush option