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
 

 

How to find the result of one Job

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

New User


Joined: 02 Aug 2003
Posts: 5

PostPosted: Tue Nov 15, 2005 12:03 pm    Post subject: How to find the result of one Job
Reply with quote

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

Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Tue Nov 15, 2005 2:29 pm    Post subject: Re: How to find the result of one Job
Reply with quote

By using condition in the Job statement

Correct me if i am wrong?????
Back to top
View user's profile Send private message
gr_mohanram

New User


Joined: 02 Aug 2003
Posts: 5

PostPosted: Tue Nov 15, 2005 2:45 pm    Post subject:
Reply with quote

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

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Tue Nov 15, 2005 3:11 pm    Post subject: Re: How to find the result of one Job
Reply with quote

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

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Nov 15, 2005 10:34 pm    Post subject: Re: How to find the result of one Job
Reply with quote

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

New User


Joined: 27 Mar 2004
Posts: 22

PostPosted: Wed Nov 16, 2005 12:33 am    Post subject: Re: How to find the result of one Job
Reply with quote

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

New User


Joined: 02 Aug 2003
Posts: 5

PostPosted: Wed Nov 16, 2005 9:26 pm    Post subject: Re: How to find the result of one Job
Reply with quote

Thanks a lot for your updates...!!!
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 find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts scheduling between OPC and TWS give u... nsbl IBM Tools 4 Sun Mar 12, 2017 5:35 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm


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