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 

To over-ride a 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
complex
Beginner


Joined: 15 Sep 2003
Posts: 8
Topics: 4

PostPosted: Thu Oct 02, 2003 3:42 pm    Post subject: To over-ride a step in a PROC Reply with quote

I need to over-ride a step (the complete step ) in a proc. in other words ,
I have a step in a proc which I dont want to be executed. Is there any way I can sepcify a over-ride from the JCL (similar to DD over-ride) ?

It's the last step of the proc and i cannot use re-start. Also , i cannot edit the PROC (rather i dont want to edit the proc).
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Oct 02, 2003 4:57 pm    Post subject: Reply with quote

complex,

Try this,

Code:

//SOMENAME  EXEC SOMEPROC,COND.LASTSTEP=((0,LE),ONLY)


Hope this helps...

cheers

kolusu
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: Sat Oct 04, 2003 8:12 pm    Post subject: Reply with quote

Kolusu,

Don't understand why you used "ONLY" in your answer.

Jack
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Sun Oct 05, 2003 7:44 am    Post subject: Reply with quote

Slade,

I used ONLY to be safe along with the COND checking.Coding COND=(0,LE), will solve the purpose here as complex wants to skip the last step.What happens if he wants to skip the first step?? In that case cond code checking does not occurr. so I have given general solution which can be applicable to any step.


Thanks

Kolusu
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: Sun Oct 05, 2003 3:30 pm    Post subject: Reply with quote

Kolusu,

My understanding of ONLY is that the step will execute if any previous step ABENDs. Is that what Complex wants?

Jack
Back to top
View user's profile Send private message
Bugs
Beginner


Joined: 24 May 2003
Posts: 5
Topics: 1
Location: Indore

PostPosted: Mon Oct 06, 2003 9:44 am    Post subject: Reply with quote

Kolusu's answer takes care of the scenario when we want to bypass the first Step. COND=ONLY executes when the step previous to the first step Abends, but there is no step before the first step ! So, the first step that also has a COND=ONLY will never get executed. Wink
Back to top
View user's profile Send private message Yahoo Messenger
complex
Beginner


Joined: 15 Sep 2003
Posts: 8
Topics: 4

PostPosted: Tue Oct 07, 2003 10:37 am    Post subject: Reply with quote

Thanks for the response Kolusu. That should work.

However there is an additional level of complexity here. This step is executed via an IF-THEN-ELSE condition. So i am unable to use the COND parameter to bypass the step. Is there a way to actually override the program name itself (i know this sounds a bit outrageous).

The step i have is a NDM step that transfers production files and i want to prevent that from happening in test.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Oct 07, 2003 11:40 am    Post subject: Reply with quote

Complex,

Till date JCL has no ability of overriding a PGM parameter. The foremost rule for modifying exec parameters is that you cannot modify a PGM parameter.

can't you just copy proc into your PDS and delete the unnecessary steps??. You can add a JCLLIB statement to execute the proc from your PDS

If you are willing to change the proc then make the PGM name to be a symbolic.Then you can override the pgm name

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
complex
Beginner


Joined: 15 Sep 2003
Posts: 8
Topics: 4

PostPosted: Tue Oct 07, 2003 12:35 pm    Post subject: Reply with quote

Hmm, that seems to be the only alternative now.

Thanks Kolusu, have a great day.
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: Tue Oct 07, 2003 4:07 pm    Post subject: Reply with quote

Kolusu,
Quote:
Till date JCL has no ability of overriding a PGM parameter. The foremost rule for modifying exec parameters is that you cannot modify a PGM parameter.


I used to think the same too. But, the following works!

Code:

//XXXXXXXX JOB ,NOTIFY=XXXXXXX             
//*                                       
//INPROC   PROC                           
//PSTEP    EXEC PGM=I&PGMNME.GENER         
//SYSIN    DD DUMMY                       
//SYSUT1   DD DSN=XXXXXXX.TEST.JCL(TEMP),
//            DISP=SHR                     
//SYSUT2   DD SYSOUT=*                     
//SYSPRINT DD SYSOUT=*                     
// PEND                                   
//STEP1    EXEC INPROC,PGMNME='EB'
//STEP2    EXEC INPROC,PGMNME='CE'
 


Or, did I misunderstand you?
_________________
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
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Oct 07, 2003 4:55 pm    Post subject: Reply with quote

Cogito-Ergo-Sum,

Did you skip to read this statement in my post??

Quote:

If you are willing to change the proc then make the PGM name to be a symbolic.Then you can override the pgm name


Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Cogito-Ergo-Sum
Advanced


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

PostPosted: Tue Oct 07, 2003 5:07 pm    Post subject: Reply with quote

Yes. I skipped.

Sorry.

Mr. Green
_________________
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
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