|
|
| Author |
Message |
stly Warnings : 1 Active User
Joined: 25 Jul 2005 Posts: 103
|
|
|
|
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 |
|
 |
References
|
Posted: Thu May 22, 2008 10:18 am Post subject: Re: How of override PGM parameter |
 |
|
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3098 Location: Charlotte,NC USA
|
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 456
|
|
|
|
Hi,
unless the PGM name is passed as a symbolic parameter, this would require a change to the PROC.
Gerry |
|
| Back to top |
|
 |
stly Warnings : 1 Active User
Joined: 25 Jul 2005 Posts: 103
|
|
|
|
Thank u superk n gerry  |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 7505 Location: 221 B Baker St
|
|
|
|
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 |
|
 |
stly Warnings : 1 Active User
Joined: 25 Jul 2005 Posts: 103
|
|
|
|
[/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 |
|
 |
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 497 Location: Richmond, Virginia
|
|
|
|
| You can do it. Did you try? |
|
| Back to top |
|
 |
Bill Dennis
Active User
Joined: 17 Aug 2007 Posts: 246 Location: Iowa, USA
|
|
|
|
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 |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 7505 Location: 221 B Baker St
|
|
|
|
Hello,
| Quote: |
| I did not get it clearly can u explain how to link it. |
Is this clear now? |
|
| Back to top |
|
 |
Anuj D.
Senior Member
Joined: 22 Apr 2006 Posts: 1696 Location: Mumbai, India
|
|
|
|
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 |
|
 |
stly Warnings : 1 Active User
Joined: 25 Jul 2005 Posts: 103
|
|
|
|
Dennis and Anuj thank u very much for ur replies.. I got it...
Ur expanations are pretty gud.. Thanks u Dick.. |
|
| Back to top |
|
 |
Anuj D.
Senior Member
Joined: 22 Apr 2006 Posts: 1696 Location: Mumbai, India
|
|
|
|
You are welcome, I hope they worked for You..Good Luck..  |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 7505 Location: 221 B Baker St
|
|
|
|
You're welcome
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 |
|
 |
|
|