Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
How of override PGM parameter

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
stly
Warnings : 1

Active User


Joined: 25 Jul 2005
Posts: 103

PostPosted: Thu May 22, 2008 10:18 am    Post subject: How of override PGM parameter
Reply with quote

I have a proc which contains 3 steps.

step1 executes pgm=pgm1
step2 executes pgm=pgm2

In the Main jcl i have to override pgm2 with pgm5.

Is this possible?
Back to top
View user's profile Send private message
References
PostPosted: Thu May 22, 2008 10:18 am    Post subject: Re: How of override PGM parameter Reply with quote

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3101
Location: Charlotte,NC USA

PostPosted: Thu May 22, 2008 10:38 am    Post subject: Reply to: How of override PGM parameter
Reply with quote

No.

5.2.1.1 Modifying EXEC Statement Parameters.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 457

PostPosted: Thu May 22, 2008 10:43 am    Post subject:
Reply with quote

Hi,
unless the PGM name is passed as a symbolic parameter, this would require a change to the PROC.


Gerry
Back to top
View user's profile Send private message
stly
Warnings : 1

Active User


Joined: 25 Jul 2005
Posts: 103

PostPosted: Thu May 22, 2008 10:52 am    Post subject: Reply to: How of override PGM parameter
Reply with quote

Thank u superk n gerry icon_biggrin.gif
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 7519
Location: 221 B Baker St

PostPosted: Thu May 22, 2008 9:56 pm    Post subject:
Reply with quote

Hello,

Quote:
In the Main jcl i have to override pgm2 with pgm5.
Is pgm5 really just another version of pgm2? If it is, you could link this version of pgm2 into some other load lib and override the steplib dd for that step so the replacement module would be executed.

If the step might sometimes execute pgm2 and sometimes pgm5, the symbolic parameter suggested would be a good way to go.
Back to top
View user's profile Send private message
stly
Warnings : 1

Active User


Joined: 25 Jul 2005
Posts: 103

PostPosted: Fri May 23, 2008 1:55 pm    Post subject:
Reply with quote

[/quote]Is pgm5 really just another version of pgm2? If it is, you could link this version of pgm2 into some other load lib and override the steplib dd for that step so the replacement module would be executed.
.[/quote]

I did not get it clearly can u explain how to link it.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 497
Location: Richmond, Virginia

PostPosted: Fri May 23, 2008 7:10 pm    Post subject:
Reply with quote

You can do it. Did you try?
Back to top
View user's profile Send private message
Bill Dennis

Active User


Joined: 17 Aug 2007
Posts: 247
Location: Iowa, USA

PostPosted: Fri May 23, 2008 7:21 pm    Post subject:
Reply with quote

Dick's point is:
If you are switching between a production version of PGM2 and a test version of PGM2 put the test version in a different library but the same name (PGM2). The STEPLIB is easily overridden on a PROC.
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 7519
Location: 221 B Baker St

PostPosted: Sat May 24, 2008 12:24 am    Post subject:
Reply with quote

Hello,

Quote:
I did not get it clearly can u explain how to link it.
Is this clear now?
Back to top
View user's profile Send private message
Anuj D.

Senior Member


Joined: 22 Apr 2006
Posts: 1708
Location: Phoenix, AZ

PostPosted: Mon May 26, 2008 12:14 pm    Post subject: Re: How of override PGM parameter
Reply with quote

Hi,
stly wrote:
In the Main jcl i have to override pgm2 with pgm5.

Try this:
Code:
2 //  JCLLIB ORDER=xxxxxxx.A.PROC                           
  //*                                                       
3 //S1       EXEC TEST,PROG=IEFBR14                         
4 XXTEST     PROC PROG=REQUIRED                             
  XX*                                                       
5 XXP1       EXEC PGM=&PROG                                 
  XX*                                                       
  IEFC653I SUBSTITUTION JCL - PGM=IEFBR14                   
. MESSAGE                                                   
3 IEFC001I PROCEDURE TEST WAS EXPANDED USING PRIVATE LIBRARY xxxxxxxx
E1PXPTST P1 S1 - STEP WAS EXECUTED - COND CODE 0000   
Back to top
View user's profile Send private message
stly
Warnings : 1

Active User


Joined: 25 Jul 2005
Posts: 103

PostPosted: Mon May 26, 2008 12:29 pm    Post subject: Reply to: How of override PGM parameter
Reply with quote

Dennis and Anuj thank u very much for ur replies.. I got it...
Ur expanations are pretty gud.. Thanks u Dick..
Back to top
View user's profile Send private message
Anuj D.

Senior Member


Joined: 22 Apr 2006
Posts: 1708
Location: Phoenix, AZ

PostPosted: Mon May 26, 2008 1:15 pm    Post subject:
Reply with quote

You are welcome, I hope they worked for You..Good Luck.. icon_smile.gif
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 7519
Location: 221 B Baker St

PostPosted: Mon May 26, 2008 7:09 pm    Post subject: Reply to: How of override PGM parameter
Reply with quote

You're welcome icon_smile.gif

Just keep in mind that unless it is defined ahead of time as a symbolic parameter, the pgm= module name cannot be overridden at run-time.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1