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

JCL to submit 3 jobs one after another


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

New User


Joined: 30 May 2010
Posts: 10
Location: Bangalore

PostPosted: Tue Jun 01, 2010 9:28 pm
Reply with quote

Hii,

Can any body help to code a JCL to run 3 jobs one after another.

Thanks
Madhu
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Jun 01, 2010 9:31 pm
Reply with quote

madhu2010 wrote:
Can any body help to code a JCL to run 3 jobs one after another.
Other than one JOB and three EXECs?
Back to top
View user's profile Send private message
madhu2010

New User


Joined: 30 May 2010
Posts: 10
Location: Bangalore

PostPosted: Tue Jun 01, 2010 9:37 pm
Reply with quote

Thanks for the response.

First job's output file feeding to Second job, Second Job Output is input to 3rd job. I want to submit first job, other two will be submitted automatically one after the other.

Also please let me know how it works with 1 job and 3 Execs.

Thanks in advance.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Jun 01, 2010 9:43 pm
Reply with quote

Quote:
I want to submit first job, other two will be submitted automatically one after the other.
Does this mean you're using a scheduler already? Or, this is what you want to happen? Or, you are submitting the second and third jobs through the internal reader? When you are not clear about what you want versus what you've done already, it makes helping you much harder.
Back to top
View user's profile Send private message
madhu2010

New User


Joined: 30 May 2010
Posts: 10
Location: Bangalore

PostPosted: Tue Jun 01, 2010 9:48 pm
Reply with quote

I am not using any scheduler. I want to happen this. I want to know if I can write a jcl to do this.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Jun 01, 2010 9:52 pm
Reply with quote

Certainly it can be done. If you want them running sequentially, add a step at the end of the first job to copy the second job's JCL to the internal reader and add a step to the end of the second job to submit the third job's JCL to the internal reader.
Back to top
View user's profile Send private message
madhu2010

New User


Joined: 30 May 2010
Posts: 10
Location: Bangalore

PostPosted: Tue Jun 01, 2010 9:54 pm
Reply with quote

Could you please share the jcl code for it.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Jun 01, 2010 9:54 pm
Reply with quote

madhu2010 wrote:
First job's output file feeding to Second job, Second Job Output is input to 3rd job. I want to submit first job, other two will be submitted automatically one after the other.
There are various ways to do what you want, but it depends on what you mean by 'feeding' and 'output' and 'input'.....
Back to top
View user's profile Send private message
madhu2010

New User


Joined: 30 May 2010
Posts: 10
Location: Bangalore

PostPosted: Tue Jun 01, 2010 9:58 pm
Reply with quote

I mean that Job 1 has one input, its output will be used as 2nd job input, so on.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Jun 01, 2010 10:03 pm
Reply with quote

Quote:
Could you please share the jcl code for it.
This is a HELP forum, not a WRITE-THE-CODE-FOR-YOU forum. Unless you are willing to pay the professionals (and the rate is typically 1000 U.S. dollars per day or fraction thereof) who respond here for their work product (which is what you are asking for), please don't ask for code.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 01, 2010 10:07 pm
Reply with quote

Hello,

Why do you want to use multiple Jobs when one Job with 3 steps would do what you want. . .?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Jun 01, 2010 10:08 pm
Reply with quote

madhu2010 wrote:
I mean that Job 1 has one input, its output will be used as 2nd job input, so on.
Then what is wrong with one JOB and three EXECs?
The output file from the first job is available to the second job immediately after the first job finishes and the second job starts. Same goes for the second and third jobs.
Back to top
View user's profile Send private message
madhu2010

New User


Joined: 30 May 2010
Posts: 10
Location: Bangalore

PostPosted: Tue Jun 01, 2010 10:14 pm
Reply with quote

Hi Robert

I agree with you. But as you suggested -

Quote:
add a step at the end of the first job to copy the second job's JCL to the internal reader and add a step to the end of the second job to submit the third job's JCL to the internal reader.


I am not getting how to write.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Jun 01, 2010 10:20 pm
Reply with quote

madhu2010 wrote:
I am not getting how to write.
Make a Job Executable through another job?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 01, 2010 10:52 pm
Reply with quote

Hello,

To repeat:
Quote:
Why do you want to use multiple Jobs when one Job with 3 steps would do what you want. . .?


Is there some business reason to complicate things with multiple jobs to provide a single job result? Most organizations do not want to support multiple jobs when one will provide the same result. . . icon_confused.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Jun 01, 2010 10:57 pm
Reply with quote

If you're going to list JCL as one of your skills on this forum, you should be able to write a simple step to copy an input file to the internal reader. Anything you don't understand in that statement can be found in the JCL manuals (link at the top of the page), or by doing a forum search on internal reader.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jun 01, 2010 10:59 pm
Reply with quote

Quote:
rate is typically 1000 U.S. dollars per day or fraction thereof


no fractions,
and it's €1200/day
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Jun 01, 2010 11:03 pm
Reply with quote

I stand corrected, Dick! At least the euro has been getting cheaper lately against the dollar -- now I just need to go somewhere that uses them! icon_biggrin.gif
Back to top
View user's profile Send private message
suny_sn1

New User


Joined: 26 Jun 2007
Posts: 6
Location: India

PostPosted: Wed Jun 02, 2010 12:13 am
Reply with quote

regarding INTRDR

hope this help...i am willing to do this at 50% discount icon_biggrin.gif
Back to top
View user's profile Send private message
Manish Kumar Gupta

New User


Joined: 19 Feb 2008
Posts: 6
Location: Bangalore

PostPosted: Thu Jun 03, 2010 12:29 am
Reply with quote

You can also use Terminal Monitoring Program like IKJEFT1B to submit the job.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 03, 2010 4:03 am
Reply with quote

Manish,

would you have the jcl for the TMP step, please.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Jun 03, 2010 4:45 am
Reply with quote

Dick's question is the only question that should be answered now.

Please do so.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Thu Jun 03, 2010 6:14 am
Reply with quote

personally I prefer having one run class unique and only associated with a single initiator. That way serial processing is assured.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Jun 03, 2010 12:53 pm
Reply with quote

Hi Dave,

what happens when a job fails, how do you prevent others from running ?

Gerry
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu Jun 03, 2010 1:28 pm
Reply with quote

Still if u need 3 separate jobs instead of 1,
Another crude approach can be,

having a IKJEFT01 step at the end of the first job with COND=(4,LT) or some other COND to check if the job ran successfully and make it execute the tso command
Code:
SUB 'YOUR.PDS.WHICH.HAS.THE.NEXTJOB'



This step will trigger next job, if the triggering job completes successfully.

Hope it helps,
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 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts Submit multiple jobs from a library t... JCL & VSAM 14
No new posts Ca7 long running jobs report All Other Mainframe Topics 1
No new posts Report of batch jobs JCL & VSAM 1
Search our Forums:

Back to Top