View previous topic :: View next topic
|
Author |
Message |
madhu2010
New User
Joined: 30 May 2010 Posts: 10 Location: Bangalore
|
|
|
|
Hii,
Can any body help to code a JCL to run 3 jobs one after another.
Thanks
Madhu |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
madhu2010
New User
Joined: 30 May 2010 Posts: 10 Location: Bangalore
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
madhu2010
New User
Joined: 30 May 2010 Posts: 10 Location: Bangalore
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
madhu2010
New User
Joined: 30 May 2010 Posts: 10 Location: Bangalore
|
|
|
|
Could you please share the jcl code for it. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
madhu2010
New User
Joined: 30 May 2010 Posts: 10 Location: Bangalore
|
|
|
|
I mean that Job 1 has one input, its output will be used as 2nd job input, so on. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Why do you want to use multiple Jobs when one Job with 3 steps would do what you want. . .? |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
madhu2010
New User
Joined: 30 May 2010 Posts: 10 Location: Bangalore
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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. . . |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
rate is typically 1000 U.S. dollars per day or fraction thereof |
no fractions,
and it's €1200/day |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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! |
|
Back to top |
|
|
suny_sn1
New User
Joined: 26 Jun 2007 Posts: 6 Location: India
|
|
Back to top |
|
|
Manish Kumar Gupta
New User
Joined: 19 Feb 2008 Posts: 6 Location: Bangalore
|
|
|
|
You can also use Terminal Monitoring Program like IKJEFT1B to submit the job. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Manish,
would you have the jcl for the TMP step, please. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Dick's question is the only question that should be answered now.
Please do so. |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 419 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
personally I prefer having one run class unique and only associated with a single initiator. That way serial processing is assured. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Dave,
what happens when a job fails, how do you prevent others from running ?
Gerry |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
|