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 

How to run a specific step in a proc ?

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


Joined: 02 Dec 2002
Posts: 48
Topics: 9
Location: Columbus, GA

PostPosted: Tue Dec 03, 2002 11:44 pm    Post subject: How to run a specific step in a proc ? Reply with quote

Hai all,

I have a doubt. Is it possible to run a specific step alone in a single proc ?

Suppose I have a Proc PPPPP which has 3 Steps. I have a JCL JJJJJ executing PPPPP proc. I just want to execute second step alone without executing the first and third step. Can any one help me ?
_________________
Thanks,
Jeba
(Known is a drop Unknown is an ocean)
Back to top
View user's profile Send private message Send e-mail
Premkumar
Moderator


Joined: 28 Nov 2002
Posts: 77
Topics: 7
Location: Chennai, India

PostPosted: Wed Dec 04, 2002 12:01 am    Post subject: Reply with quote

Jeba,

Condition out steps you don't want to execute.
Code:

//*                                                 
//PPPPP   PROC                                     
//PS01    EXEC PGM=IEFBR14                         
//PS02    EXEC PGM=IEFBR14                         
//PS03    EXEC PGM=IEFBR14                         
//        PEND                                     
//*                                                 
//STEP01  EXEC PPPPP,COND.PS01=ONLY,COND.PS03=(0,LE)
//*                                                 
Back to top
View user's profile Send private message Send e-mail
Jeba
Beginner


Joined: 02 Dec 2002
Posts: 48
Topics: 9
Location: Columbus, GA

PostPosted: Wed Dec 04, 2002 12:27 am    Post subject: Reply with quote

Prem,

That's fine. But this won't work properly if the second step (PS02) produces return code greater than zero. Correct me if I am wrong.
_________________
Thanks,
Jeba
(Known is a drop Unknown is an ocean)
Back to top
View user's profile Send private message Send e-mail
Premkumar
Moderator


Joined: 28 Nov 2002
Posts: 77
Topics: 7
Location: Chennai, India

PostPosted: Wed Dec 04, 2002 12:47 am    Post subject: Reply with quote

Jeba,

I'm sorry but you are wrong. Test it.
Back to top
View user's profile Send private message Send e-mail
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Wed Dec 04, 2002 4:10 am    Post subject: Reply with quote

Hi Jeba,

COND=(0,LE) on a particluar step means that this step will not run if 0 is less than or equal to the condition code of any prior steps. As the condition code of all the prior steps can be zero at the least(or more), this implies that this step will never run for whatever condition codes the previous steps throw.

Regards,
Manas
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Jeba
Beginner


Joined: 02 Dec 2002
Posts: 48
Topics: 9
Location: Columbus, GA

PostPosted: Wed Dec 04, 2002 11:22 am    Post subject: Reply with quote

Prem,

Sorry. Today I have tested and it is working fine. Previously I misunderstood the condition that the particular step will not execute if any of the previous steps return code is less than or equal to zero. Now I am clear about this.

Manas,

Thanks for your help to understand the condition.
_________________
Thanks,
Jeba
(Known is a drop Unknown is an ocean)
Back to top
View user's profile Send private message Send e-mail
syandra
Beginner


Joined: 26 May 2003
Posts: 19
Topics: 6

PostPosted: Wed May 28, 2003 8:09 am    Post subject: Reply with quote

Hi all,

I have a doubt, If I have a proc with 20 steps in it and I need to run only one/two steps from it, I need to code COND for all the steps in the similar fashion explained above. Can anyone help me if there is any other alternative.

Thanks,
Sukumar
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Wed May 28, 2003 8:34 am    Post subject: Reply with quote

When it is abundantly clear that, only certain steps need to be executed, then why take pains to code COND parameters, et al ? Just delete the unwanted steps. What does one stand to lose ?
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
CaptBill
Beginner


Joined: 02 Dec 2002
Posts: 100
Topics: 2
Location: Pasadena, California, USA

PostPosted: Wed May 28, 2003 1:14 pm    Post subject: Reply with quote

Do you know the story of the Gordian Knot? If you don't, then read http://www.maa.org/devlin/devlin_9_01.html

The job is set up for normal execution. Since you are not doing normal execution, copy the job and edit it removing all the steps you do not want to run."

In other words, cut through the crap and get to the task.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Wed May 28, 2003 11:30 pm    Post subject: Reply with quote

CaptBill probably has the right idea. I find myself doing it quite often when called upon to modify 1 or 2 pgms in a jobstream. Some procs have more than 40 to 50 steps. I've heard of procs w/hundreds (255/6 is the max, I think).

The problem I found was with the symbolics. I found myself executing the modified proc 4 or 5 times before it worked. I wound up writing a routine that recreated the PROC stmt based on the steps I excised from the original proc.
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