Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Submit JCLs in one go

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
zh_lad

New User


Joined: 06 Jun 2009
Posts: 79
Location: UK

PostPosted: Fri Jul 03, 2015 2:57 pm    Post subject: Submit JCLs in one go
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: 22
Location: Bangalore

PostPosted: Fri Jul 03, 2015 3:01 pm    Post subject:
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

New User


Joined: 06 Jun 2009
Posts: 79
Location: UK

PostPosted: Fri Jul 03, 2015 4:09 pm    Post subject:
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: 22
Location: Bangalore

PostPosted: Fri Jul 03, 2015 4:26 pm    Post subject:
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

New User


Joined: 06 Jun 2009
Posts: 79
Location: UK

PostPosted: Fri Jul 03, 2015 6:03 pm    Post subject:
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: 7904
Location: Bellevue, IA

PostPosted: Fri Jul 03, 2015 7:23 pm    Post subject:
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

New User


Joined: 06 Jun 2009
Posts: 79
Location: UK

PostPosted: Fri Jul 03, 2015 7:56 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Don't allow CICS to submit batch jobs prino JCL & VSAM 5 Mon Jul 25, 2016 3:26 pm
No new posts How to trigger a Application(AD- bunc... DEEPAK GARG COBOL Programming 1 Wed Feb 11, 2015 2:43 pm
No new posts Submit a Job through Rexx janmejay CLIST & REXX 10 Wed Jul 30, 2014 6:16 pm
No new posts Pass the value from panel to prog to ... jackzhang75 TSO/ISPF 1 Wed Jul 02, 2014 8:59 pm
No new posts submit job on another LPAR vikramyadav JCL & VSAM 7 Tue Jun 24, 2014 9:11 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us