View previous topic :: View next topic |
Author |
Message |
hari_uss Beginner
Joined: 19 Dec 2002 Posts: 78 Topics: 6 Location: Trivandrum, India
|
Posted: Sat Mar 15, 2003 2:58 am Post subject: DD Overrides in nested PROCs |
|
|
Is there anyway to override a DDNAME in a second level proc from the JCL.
I.e., Jcl A executes proc B. Proc B calls Proc C, which has a DSN in it, named D.E.FILE.
I want to override this DSN from Jcl A. Is that possible?
Thanks,
Hari. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Sat Mar 15, 2003 8:53 am Post subject: |
|
|
hari_uss,
As far as I know a jcl or jcl JCL PROC can only override the next lower level PROC. You can't override in to more than one level of nested PROCS.
Having said that you can the override the proc B DSN from proc A.
Hope this helps...
cheers
kolusu |
|
Back to top |
|
 |
sanat Beginner
Joined: 15 Feb 2003 Posts: 11 Topics: 7 Location: chennai
|
Posted: Sat Mar 15, 2003 10:16 am Post subject: |
|
|
Hi,
I feel that is possible. You just have to specify the STEPNAME.DDNAME as told by Kolusu. If there is a case, Jcl A calls Proc B, Proc B calls Proc C, (assuming proc C has something like this,
//STEPC EXEC PGM=AAA
//FILEC1 DD DSN=AA.BB.CC,DISP=SHR
To override the file FILEC1 from JCl A, use the following syntax,
//STEPC.FILEC1 DD DSN=.....
When you use nested procs, make sure that all the STEPNames that contain EXEC PGM must be unique. It's not mandatory, but there will be not any be confusion, while doing a override.
But I am not sure about the RESTART in case of nested procs, because the syntax is PROCNAME.STEPNAME.
Sanat. |
|
Back to top |
|
 |
CaptBill Beginner
Joined: 02 Dec 2002 Posts: 100 Topics: 2 Location: Pasadena, California, USA
|
Posted: Mon Mar 17, 2003 2:55 pm Post subject: |
|
|
In simpler terms, what the other postings are saying is Quote: | It can be done, but nobody said it would be easy. |
|
|
Back to top |
|
 |
hari_uss Beginner
Joined: 19 Dec 2002 Posts: 78 Topics: 6 Location: Trivandrum, India
|
Posted: Thu Mar 20, 2003 2:47 am Post subject: |
|
|
Not very difficult..One of my colleague gave me a solution.
In PROC C, I coded
Code: |
//DD1 DSN=&DSN1,DISP=SHR
|
In PROC B,
Code: |
//PROCB PROC DSN1='D.E.FILE'
//....
//PROCC PROC
//...
|
In JCL A,
Code: |
//STEP01 EXEC PROCB,DSN1='X.Y.FILE'
//..
|
I got the DD1 overriden to 'X.Y.FILE'.
If I do not code any parameter in JCLA while executing PROCB, then it will take the DEFAULT DSN coded in the PROC step statement of PROCB (I.e., 'D.E.FILE').
Thanks, |
|
Back to top |
|
 |
niks_jude Beginner
Joined: 23 Nov 2006 Posts: 8 Topics: 2
|
Posted: Sun Feb 17, 2008 6:12 am Post subject: |
|
|
I saw this topic while seeing some older posts. I could not keep myself of bringing this discussion as this can be misleading to new developers reading some older posts, while doing a search maybe.
Here it is written PROC calling PROC. I would like to say this is impossible as a PROC cannot calll another PROC. Only EXEC=PGM is allowed in a PROC but not a EXEC PROC.
Please let me know in case anybody has other opinions. |
|
Back to top |
|
 |
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Sun Feb 17, 2008 11:15 am Post subject: |
|
|
PROCs can be nested to 15 levels. See Chapter 5 of the MVS JCL Reference manual. _________________ ....Terry |
|
Back to top |
|
 |
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Sun Feb 17, 2008 4:42 pm Post subject: |
|
|
niks_jude wrote: |
Please let me know in case anybody has other opinions. |
I do not have an other opinion, I know for a fact that you can nest proc's. |
|
Back to top |
|
 |
|
|