View previous topic :: View next topic
|
Author |
Message |
gr_mohanram
New User
Joined: 02 Aug 2003 Posts: 5
|
|
|
|
I have the requirements..
I want to run a "JOB C". But the condition is "JOB A" & "JOB B" should be completed successful. Then only i can run my "JOB C".
So how to find out in JCL for the completion of other jobs.
Anykind of Suggession or Help are most welcomed....
Thanks in Advance,
MR |
|
Back to top |
|
|
Prasanthhere
Active User
Joined: 03 Aug 2005 Posts: 306
|
|
|
|
By using condition in the Job statement
Correct me if i am wrong????? |
|
Back to top |
|
|
gr_mohanram
New User
Joined: 02 Aug 2003 Posts: 5
|
|
|
|
Your answer might be correct but my question is how to check it in JCL? (ie.) i want a JCL syntax to find the return code of some other job??? |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Dont know how to trap condition codes from one job to others.
But your main requirement of running third job only on completion of the previous two can be achieved by some schedular tool like CA-7.
Regards,
Priyesh. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I agree with the above recommendations that you should be using a job scheduler for this process.
However, outside of that, I can think of two options:
1. Why not just have JOBA and JOBB each catalog a dataset when they end, indicating the final status of the job. Then, have JOBC check for the existence of valid data in BOTH datasets before it can continue.
2. Make use of the TSO OUTPUT command to retrieve the output of both JOBA and JOBB from the JES Held Output Queue:
Code: |
//STEP0001 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
OUTPUT JOBA PRINT(JOBA.JOB) BEGIN HOLD KEEP
OUTPUT JOBB PRINT(JOBB.JOB) BEGIN HOLD KEEP
/*
//*
//STEP0002 EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=&SYSUID..JOBA.JOB.OUTLIST
// DD DISP=SHR,DSN=&SYSUID..JOBB.JOB.OUTLIST
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL INCLUDE=(2,7,CH,EQ,C'IEF142I'),
OUTREC=(2,80)
/*
|
|
|
Back to top |
|
|
shailen
New User
Joined: 27 Mar 2004 Posts: 22
|
|
|
|
Hi,
If you think tool like CA7 is useful then 2 lines will work healthy.
DEMAND,JOB=JOBC,DEPJOB=JOBA
ADDRQ,JOB=JOBC,DEPJOB=JOBB
Thanks |
|
Back to top |
|
|
gr_mohanram
New User
Joined: 02 Aug 2003 Posts: 5
|
|
|
|
Thanks a lot for your updates...!!! |
|
Back to top |
|
|
|