View previous topic :: View next topic |
Author |
Message |
edkir98 Beginner
Joined: 27 Aug 2007 Posts: 102 Topics: 42 Location: Chennai
|
Posted: Thu Oct 04, 2007 5:32 am Post subject: Override a program |
|
|
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 |
|
|
vivek1983 Intermediate
Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Thu Oct 04, 2007 5:42 am Post subject: |
|
|
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 |
|
|
pundareekam Beginner
Joined: 13 Jun 2007 Posts: 9 Topics: 3
|
Posted: Thu Oct 04, 2007 5:49 am Post subject: |
|
|
you can just code //STEP1 EXEC PROCNAME,R010.PGM=XYZ |
|
Back to top |
|
|
vkphani Intermediate
Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
Posted: Thu Oct 04, 2007 6:12 am Post subject: Re: Override a program |
|
|
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 |
|
|
edkir98 Beginner
Joined: 27 Aug 2007 Posts: 102 Topics: 42 Location: Chennai
|
Posted: Thu Oct 04, 2007 6:26 am Post subject: |
|
|
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 |
|
|
vkphani Intermediate
Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
Posted: Thu Oct 04, 2007 6:32 am Post subject: |
|
|
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 |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
|
Back to top |
|
|
edkir98 Beginner
Joined: 27 Aug 2007 Posts: 102 Topics: 42 Location: Chennai
|
Posted: Thu Oct 04, 2007 6:51 am Post subject: |
|
|
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 |
|
|
vkphani Intermediate
Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
Posted: Thu Oct 04, 2007 6:53 am Post subject: |
|
|
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 |
|
|
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Thu Oct 04, 2007 8:56 am Post subject: |
|
|
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 |
|
|
vkphani Intermediate
Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
Posted: Thu Oct 04, 2007 9:45 am Post subject: |
|
|
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 |
|
|
|
|