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 

Override a program

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


Joined: 27 Aug 2007
Posts: 102
Topics: 42
Location: Chennai

PostPosted: Thu Oct 04, 2007 5:32 am    Post subject: Override a program Reply with quote

Is it possible to override a particular program in a step in a proc with another program in the JCL which executes that proc.

For eg. I the proc P1, I have
//R010 EXEC PGM=ABCD
I would like to override this program with another program XYZ by giving this XYZ program as an override in the JCL without disturbing the proc. Is that possible?
_________________
Thanks
Back to top
View user's profile Send private message Yahoo Messenger
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Thu Oct 04, 2007 5:42 am    Post subject: Reply with quote

edkir98,

Are the files associated with the PGM=ABCD the same for PGM=XYZ?
_________________
Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay)
Back to top
View user's profile Send private message
pundareekam
Beginner


Joined: 13 Jun 2007
Posts: 9
Topics: 3

PostPosted: Thu Oct 04, 2007 5:49 am    Post subject: Reply with quote

you can just code //STEP1 EXEC PROCNAME,R010.PGM=XYZ
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Thu Oct 04, 2007 6:12 am    Post subject: Re: Override a program Reply with quote

edkir98 wrote:
Is it possible to override a particular program in a step in a proc with another program in the JCL which executes that proc.

For eg. I the proc P1, I have
//R010 EXEC PGM=ABCD
I would like to override this program with another program XYZ by giving this XYZ program as an override in the JCL without disturbing the proc. Is that possible?


If your job has the EXEC step as
Code:
//EXEC1 EXEC PROC P1
and if you want to override
Code:
//R010    EXEC PGM=ABCD
which is a step inside P1, you have to make changes to your job as below.

Code:
//EXEC1 EXEC PROC P1
//P1.R010 EXEC PGM=XYZ
Back to top
View user's profile Send private message Send e-mail
edkir98
Beginner


Joined: 27 Aug 2007
Posts: 102
Topics: 42
Location: Chennai

PostPosted: Thu Oct 04, 2007 6:26 am    Post subject: Reply with quote

Hi vkphani,

I did as you advised, but it is not picking up the XYZ load. Its still picking up the ABCD load.

Hi Pundareekam,
Your suggestion is causing a JCLERR.

Hi Vivek,
Yes the DD names are the same for both the programs.
_________________
Thanks
Back to top
View user's profile Send private message Yahoo Messenger
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Thu Oct 04, 2007 6:32 am    Post subject: Reply with quote

edkir98 wrote:
Hi vkphani,
I did as you advised, but it is not picking up the XYZ load. Its still picking up the ABCD load.

edkir98,
You cannot modify a PGM parameter. Pls check the below link. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B632/5.2.1.1?SHELF=&DT=20030819135048&CASE=

You should be able to achieve this using symbolic parms..

Code:
//JOBNAME JOB ACCOUNT,CLASS=A,
// MSGCLASS=X
//STEP1 EXEC PROCNAME,PGMNAME=AAAAAAAA


Code:
//PROCNAME PROC PGMNAME=' '
//PSTEP EXEC PGM=&PGMNAME


You can pass the Program name from JCL.


Last edited by vkphani on Thu Oct 04, 2007 6:36 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Oct 04, 2007 6:35 am    Post subject: Reply with quote

It is not possible. See the rules here in Chapter 5.2.1.1 Modifying EXEC Statement Parameters.
Back to top
View user's profile Send private message
edkir98
Beginner


Joined: 27 Aug 2007
Posts: 102
Topics: 42
Location: Chennai

PostPosted: Thu Oct 04, 2007 6:51 am    Post subject: Reply with quote

hi vkphani,

You're solution is working great. But my problem is a bit different I have a utility to execute

eg.

//R010 EXEC IGYWCL

It doesn't have a PGM=.. I'm not able to make like this

//R010 EXEC &PGMNAME
It throws a JCLERR.
_________________
Thanks
Back to top
View user's profile Send private message Yahoo Messenger
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Thu Oct 04, 2007 6:53 am    Post subject: Reply with quote

edkir98,

Then you have to create new proc with whatever changes you want and execute that new proc instead of old proc.
Back to top
View user's profile Send private message Send e-mail
slade
Intermediate


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

PostPosted: Thu Oct 04, 2007 8:56 am    Post subject: Reply with quote

Hi Edward,

The IGYWCL in your problem is not a pgm or a utility name, it's a cat proc name.
_________________
Regards, Jack.

"A problem well stated is a problem half solved" -- Charles F. Kettering
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Thu Oct 04, 2007 9:45 am    Post subject: Reply with quote

edkir98,

What slade said is absolutely right. You are executing a PROC and not a program. JCL will have the syntax as PGM=xxx if you are executing a program.
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