|
View previous topic :: View next topic
|
| Author |
Message |
zh_lad
Active User
Joined: 06 Jun 2009 Posts: 115 Location: UK
|
|
|
|
Hi all,
I have 80 odd jobs (JCLs) which I run quite often, its a clone of a batch which runs on CA7, output files have my racf ID as 2nd qual. I do not have previlieage to set up a schedule in CA7.
Is there a way I can submit all these jobs in one go to run one after another? They are named in such a way list (sorted on name) reflects dependency.
Thanks,
zh_lad |
|
| Back to top |
|
 |
Smita.t2
New User

Joined: 17 Apr 2012 Posts: 31 Location: Bangalore
|
|
|
|
It can be done through internal reader by adding an additional step in the jcls.
//STEPNAME EXEC PGM=IEBGENER
//SYSUT1 DD DSN=PDSNAME(MEMBERNAME),
// DISP=SHR
//SYSUT2 DD SYSOUT=(,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY |
|
| Back to top |
|
 |
zh_lad
Active User
Joined: 06 Jun 2009 Posts: 115 Location: UK
|
|
|
|
Thanks Smita. I helped.
| Code: |
//ABCDEFG JOB CLASS=I,MSGLEVEL=1,USER=&SYSUID,NOTIFY=&SYSUID
//TSTBPROC PROC MEM=
//STEPMAIN EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=A.B.C(&MEM)
//SYSUT2 DD SYSOUT=(,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
// PEND
//STEP0001 EXEC TSTBPROC,MEM=PSD1
//STEP0002 EXEC TSTBPROC,MEM=PDS2,COND=(0,LT)
//STEP0003 EXEC TSTBPROC,MEM=PSD3,COND=(8,LE) |
I want to add condition codes say step STEP0002 should execute only if RC from STEP0001=0 and step STEP0003 should execute of RC from step STEP0002 is LE to 8?
I tried above code but it seems my condition codes are being ignored.
Many thanks. |
|
| Back to top |
|
 |
Smita.t2
New User

Joined: 17 Apr 2012 Posts: 31 Location: Bangalore
|
|
|
|
1. If there is a dependency between the jobs, then usually we add Internal reader step as the last step in the jcl, along with condition code check(if required).
Kindly check in your case.
2.
Post the JESMSG contents.
COND on exec:
If it evaluates to true, particular step is BYPASSED.
May be you need to change
//STEP0003 EXEC TSTBPROC,MEM=PSD3,COND=(8,LT) |
|
| Back to top |
|
 |
zh_lad
Active User
Joined: 06 Jun 2009 Posts: 115 Location: UK
|
|
|
|
I think INTRDR does not help here.
| Code: |
//TTMAALLJ JOB CLASS=I,MSGLEVEL=1,USER=&SYSUID,NOTIFY=&SYSUID
//TSTBPROC PROC MEM=
//STEPMAIN EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=TTMA.VERMRWP.TESTBED.VRRW(&MEM)
//SYSUT2 DD SYSOUT=(,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
// PEND
//STEP0001 EXEC TSTBPROC,MEM=APISCBK1
//STEP0002 EXEC TSTBPROC,MEM=APISCBK4,COND=(8,LT)
//STEP0003 EXEC TSTBPROC,MEM=BPTLF,COND=(8,LT)
//STEP0004 EXEC TSTBPROC,MEM=CPISC01,COND=(0,LT)
//STEP0005 EXEC TSTBPROC,MEM=DNBT569,COND=(0,LT) ran at 13.15.26
//STEP0006 EXEC TSTBPROC,MEM=EMA0189,COND=(0,LT) ran at 13.15.18
|
| Code: |
JOB STEP PROCSTEP PROG RETURN
NAME NAME NAME NAME CODE
TTMAALLJ STEP0001 STEPMAIN IEBGENER 0000
TTMAALLJ STEP0002 STEPMAIN IEBGENER 0000
TTMAALLJ STEP0003 STEPMAIN IEBGENER 0000
TTMAALLJ STEP0004 STEPMAIN IEBGENER 0000
TTMAALLJ STEP0005 STEPMAIN IEBGENER 0000
TTMAALLJ STEP0006 STEPMAIN IEBGENER 0000
|
step 5 ran ahead of step 6. STEP006 failed with JCL error (data set not found) as STEP005 ran before 0006.
It appears jobs are submitted in PAR and condition codes have no bearing on execution.
Problem is, IEBGENER is always giving RC=0000 even though job had jcl error.
Thanks. |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
If you submit multiple jobs at one time like you posted, JES will NOT guarantee that they will execute in the order submitted -- so the results you report are normal and expected.
You need to change EACH JOB so the last step of the job submits the next job. The ONLY other viable option is to use a job scheduler to submit them in the desired sequence. Submitting multiple jobs at one time, as you have discovered, does not produce the results you want.
Also, I think you misunderstand -- the IEBGENER will give you a return code of 0000 as long as the job was submitted. IEBGENER does not have any way of determining whether or not the submitted job had a return code of 0000 or not -- nor does it matter; the submitted job runs in a separate address space and hence there is no interaction between the submitted job and the IEBGENER. |
|
| Back to top |
|
 |
zh_lad
Active User
Joined: 06 Jun 2009 Posts: 115 Location: UK
|
|
|
|
Thanks Robert. I have changed it each job to have last step to submit next job.
Thank you all for your help. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|