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 

JCL restart

 
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
gans79
Beginner


Joined: 31 Aug 2005
Posts: 51
Topics: 27

PostPosted: Thu Sep 08, 2005 5:12 am    Post subject: JCL restart Reply with quote

hi,
i'am having a job with 10 steps
1. I want to execute only step 5
2. I want to excute steps 5,6,7,8

one way to achieve this is using Restart & NULL statement, after the step, how to perform using COND parameter??

thanks
ganesh
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Sep 08, 2005 5:32 am    Post subject: Reply with quote

gans79,

Use COND=(00,LE) to stop any job/proc step from executing. But this will not work if the step is the first step since there is no RC to compare before the first step.

To suppress the first step from execution, you need to use COND=ONLY. For other steps use COND=(00,LE).

1. Code COND=ONLY for first step and COND=(00,LE) for all other steps except Step 05.
Code:

//STEP01   EXEC PGM=AAXXBB,COND=ONLY
//STEPLIB  DD  DSN=.....
//......
//STEP02   EXEC PGM=XXBBEE,COND=(00,LE)
//STEPLIB  DD  DSN=....
//.....
//STEP03   EXEC PGM=XXBBEE,COND=(00,LE)
//STEPLIB  DD  DSN=....
//.....
//STEP04   EXEC PGM=XXBBEE,COND=(00,LE)
//STEPLIB  DD  DSN=....
//.....
//STEP05   EXEC PGM=XXBBEE
//STEPLIB  DD  DSN=....
//.....
//STEP06   EXEC PGM=XXBBEE,COND=(00,LE)
//STEPLIB  DD  DSN=....
//.....


2. Execute 5, 6, 7, 8. Same as above except that remove the COND=(00,LE) parm from Steps 6, 7 & 8.

Hope this answers your question,

Thanks,
Phantom
Back to top
View user's profile Send private message
gans79
Beginner


Joined: 31 Aug 2005
Posts: 51
Topics: 27

PostPosted: Thu Sep 08, 2005 6:38 am    Post subject: Reply with quote

hi thanks for the response,
can i code restart = step5, cond = (0,LE) in the job card, instead of coding it in each step ??
if yes, how can we execute only steps (5,6,7,8 ) in using Restart & COND

thanks
ganesh
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Sep 08, 2005 7:36 am    Post subject: Reply with quote

gans79,

looking at your first post, I thought you were not interested in RESTART.

Anyway...COND parameter - if provided in JOB CARD, will work for all job steps. This will not suit your case since it will stop all steps (except the first one).

If you have a INSTREAM JCL, then you can provide RESTART=STEP05 and you must code COND=(00,LE) in all steps after STEP08.

Note: You must be careful using RESTART and COND together. If by any change you give RESTART=STEP05 and have a COND=(00,LE) at STEP05, the step will still continue to execute as this will become the first executable step and there is no RC to check.

If you use JOB-PROC, then u can specify individual COND parms in the EXEC statement
Code:

//JOBCARD....
//....
//STEP1   EXEC PROCNAME,COND.STEP04=(00,LE),COND.STEP09=(00,LE)


Hope this helps,

Thanks,
Phantom
Back to top
View user's profile Send private message
gans79
Beginner


Joined: 31 Aug 2005
Posts: 51
Topics: 27

PostPosted: Thu Sep 08, 2005 9:28 am    Post subject: Reply with quote

hi phantom
Thanks for the response , but i quite didn't get the solution u gave,
letme clarify the problem

1. I have a instream JCL,( not calling any PROC ) with 10 steps
& i have 2 scenarios to handle
a) only execute step 5
b) only execute steps 5,6,7,8

can u give me the solution using restart & cond for both the cases.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Sep 08, 2005 9:43 am    Post subject: Reply with quote

Quote:

a) only execute step 5


Code restart=step5 on your jobcard and place a null(//) statement after step5.

Quote:

b) only execute steps 5,6,7,8


Same as above but only difference is the placement of the null statement after step8.

Another option is to copy the desired steps using IEBEDIT and submit the job via Intrdr.

Check this link which explains in detail about IEBEDIT along with examples

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dgt1u104/5.0?DT=19990113105507

Hope this helps...

Cheers

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


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Sep 08, 2005 9:47 am    Post subject: Reply with quote

As I mentioned in my earlier post you cannot provide COND parameter in JOB Card for your case, because the COND in JOB CARD is common to all steps in the job. So none of your job steps will execute. So, there is no other way than providing COND parms in each and every job step you have. (Ofcourse there are other ways like IF/ELSE but not with COND).

If you use RESTART=STEP05, you can avoid giving COND in the first 4 job steps.

The following code will RESTART the job from STEP05 and will execute steps 5, 6, 7 and 8 (CASE 2). For Case 1, you need to provide COND=(00,LE) in all steps after STEP05 (Steps 6, 7, 8, 9, .....).
Code:

//JOBCARD.....
//        RESTART=STEP05
//*
//STEP01   EXEC PGM=AAXXBB
//STEPLIB  DD  DSN=.....
//......
//STEP02   EXEC PGM=XXBBEE
//STEPLIB  DD  DSN=....
//.....
//STEP03   EXEC PGM=XXBBEE
//STEPLIB  DD  DSN=....
//.....
//STEP04   EXEC PGM=XXBBEE
//STEPLIB  DD  DSN=....
//.....
//STEP05   EXEC PGM=XXBBEE
//STEPLIB  DD  DSN=....
//.....
//STEP06   EXEC PGM=XXBBEE
//STEPLIB  DD  DSN=....
//.....
//STEP07   EXEC PGM=XXBBEE
//STEPLIB  DD  DSN=....
//.....
//STEP08   EXEC PGM=XXBBEE
//STEPLIB  DD  DSN=....
//.....
//STEP09   EXEC PGM=XXBBEE,COND=(00,LE)
//STEPLIB  DD  DSN=....
//.....
//STEP10   EXEC PGM=XXBBEE,COND=(00,LE)
//STEPLIB  DD  DSN=....
//.....


Pls let me know if you still face any problems.

I suggest you go through the JCL manual.
http://publibz.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/IEA2B632/CCONTENTS?DT=20030819135048

Thanks,
Phantom
Back to top
View user's profile Send private message
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