MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Executing a second job from first jobs

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
kavi
Beginner


Joined: 15 Sep 2006
Posts: 64
Topics: 22

PostPosted: Fri Dec 14, 2007 5:35 am    Post subject: Executing a second job from first jobs Reply with quote

HI all

Here is my requirement.

I have a job with 5 steps and in STEP005 a GDG is created. I need to execute another Job once STEP005 ends with RC=0. If I use INTRDR will I use (+0) OR (+1) for the GDG created in STEP005. Since I do not have access to use INTRDR I can't test it.

Please help on this

Thanks in advance
Kavi
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Fri Dec 14, 2007 5:41 am    Post subject: Reply with quote

Kavi,

You have to use (+0) as you are running your second job once first job sucessfully ends.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Dec 14, 2007 11:07 am    Post subject: Reply with quote

kavi,

Why not simply copy the second job into first job after step005?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kavi
Beginner


Joined: 15 Sep 2006
Posts: 64
Topics: 22

PostPosted: Mon Dec 17, 2007 1:31 am    Post subject: Reply with quote

vkphani,

Thanks for your replay

Kolusu,

My requirement is to execute the second job if STEP005 ends with only RC=0. Will it possible to check the return code of STEP005 of first job in second job incase I copy the second job after STEP005. If so it would be helpful if you post any sample code.

Thanks in advance,
Kavi
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Mon Dec 17, 2007 2:34 am    Post subject: Reply with quote

Kavi,

a. You can code an IF/THEN/ELSE Construct and only run the desired steps.

Check this link for detailed explanation of IF/THEN/ELSE construct

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B631/17.0?DT=20030423085347

b. You can also use COND parameter to run the desired steps

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B631/16.5?DT=20030423085347

Go thru the below link:
http://mvsforums.com/helpboards/viewtopic.php?t=2414&highlight=condition
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group