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 

DD Overrides in nested PROCs

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


Joined: 19 Dec 2002
Posts: 78
Topics: 6
Location: Trivandrum, India

PostPosted: Sat Mar 15, 2003 2:58 am    Post subject: DD Overrides in nested PROCs Reply with quote

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
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sat Mar 15, 2003 8:53 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sanat
Beginner


Joined: 15 Feb 2003
Posts: 11
Topics: 7
Location: chennai

PostPosted: Sat Mar 15, 2003 10:16 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
CaptBill
Beginner


Joined: 02 Dec 2002
Posts: 100
Topics: 2
Location: Pasadena, California, USA

PostPosted: Mon Mar 17, 2003 2:55 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
hari_uss
Beginner


Joined: 19 Dec 2002
Posts: 78
Topics: 6
Location: Trivandrum, India

PostPosted: Thu Mar 20, 2003 2:47 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
niks_jude
Beginner


Joined: 23 Nov 2006
Posts: 8
Topics: 2

PostPosted: Sun Feb 17, 2008 6:12 am    Post subject: Reply with quote

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
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Sun Feb 17, 2008 11:15 am    Post subject: Reply with quote

PROCs can be nested to 15 levels. See Chapter 5 of the MVS JCL Reference manual.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Sun Feb 17, 2008 4:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
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