IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Submit JCLs in one go


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
zh_lad

Active User


Joined: 06 Jun 2009
Posts: 115
Location: UK

PostPosted: Fri Jul 03, 2015 2:57 pm
Reply with quote

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
View user's profile Send private message
Smita.t2

New User


Joined: 17 Apr 2012
Posts: 31
Location: Bangalore

PostPosted: Fri Jul 03, 2015 3:01 pm
Reply with quote

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
View user's profile Send private message
zh_lad

Active User


Joined: 06 Jun 2009
Posts: 115
Location: UK

PostPosted: Fri Jul 03, 2015 4:09 pm
Reply with quote

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
View user's profile Send private message
Smita.t2

New User


Joined: 17 Apr 2012
Posts: 31
Location: Bangalore

PostPosted: Fri Jul 03, 2015 4:26 pm
Reply with quote

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
View user's profile Send private message
zh_lad

Active User


Joined: 06 Jun 2009
Posts: 115
Location: UK

PostPosted: Fri Jul 03, 2015 6:03 pm
Reply with quote

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
Code:


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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Fri Jul 03, 2015 7:23 pm
Reply with quote

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
View user's profile Send private message
zh_lad

Active User


Joined: 06 Jun 2009
Posts: 115
Location: UK

PostPosted: Fri Jul 03, 2015 7:56 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Submit multiple jobs from a library t... JCL & VSAM 14
No new posts How to submit multiple jobs with parm... JCL & VSAM 3
No new posts Updating endevor JCLs CA Products 5
No new posts Modify Several JCLs at the Same Time JCL & VSAM 6
No new posts Submit Print Job For PDS Member With ... TSO/ISPF 17
Search our Forums:

Back to Top