MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
misi01 Advanced Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
Posted: Mon Oct 19, 2015 6:20 am Post subject: File allocation when no filename passed to proclib
I'm sure I've seen this somewhere, but just can't remember where.
My proclib starts with the following
Code:
//DEFAULT PROC SYSTEM=&SYSTEM,
// PROGRAM='',
// TABLE=&TABLE,
// COPYFIL=''
(COPYFIL is optional). The DD statement I'm having problems with is the following (I appreciate this is incorrect)
Code:
//COPYFIL DD DUMMY.DSN=©FIL,DISP=SHR
Basically, I want COPYFIL to be a DUMMY if nothing is passed in, otherwise I want it to be allocated as (say)
Code:
//COPYFIL DD DSN=MYFILE.SECOND.THIRD(FOURTH),DISP=SHR
How do I achieve this ? _________________ Michael
Back to top
Nic Clouston Advanced Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Mon Oct 19, 2015 7:37 am Post subject:
COPYFIL=NULLFILE _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
William Collins Supermod Joined: 03 Jun 2012 Posts: 437 Topics: 0
Posted: Mon Oct 19, 2015 7:59 am Post subject:
Yes, if you want to dummy-out by DSN, NULLFILE is the chap.
Code: //DEFAULT PROC SYSTEM=&SYSTEM,
// PROGRAM='',
// TABLE=&TABLE,
// COPYFIL='NULLFILE'
And:
Code: //COPYFIL DD DSN=©FIL,...
Back to top
misi01 Advanced Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
Posted: Mon Oct 19, 2015 8:07 am Post subject:
Thanks to both of you; worked a treat.
Though it wasn't the solution I thought (?) I'd seen, but it's much more elegant. _________________ Michael
Back to top
misi01 Advanced Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
Posted: Mon Oct 19, 2015 8:13 am Post subject:
Just got a reply from a colleague. I think this was the one I was thinking of (but NULLFILE is still more elegant)
Code:
//DEFAULT PROC IN=,OUT=,OPT=C,SPIE=0,TEST=0,DIRCA=000,
// CKPTID=NOMSGS,SSM=,
// APARM=,NBA=,OBA=,
// DUMMY1='DUMMY,',
// DUMMY2='DUMMY,'
and further down
Code:
//DEL2 EXEC PGM=IEFBR14
//DD1 DD &DUMMY1.DSN=&UTFIL01,DISP=(MOD,DELETE)
and the actual parameter in the JCL calling the proc
Code:
UTFIL01=myfile.second.third(+1),
DUMMY1=,
Thanks again _________________ Michael
Back to top
Nic Clouston Advanced Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Mon Oct 19, 2015 2:28 pm Post subject:
I think it should be
Anything after the space is treated as a comment _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
William Collins Supermod Joined: 03 Jun 2012 Posts: 437 Topics: 0
Posted: Mon Oct 19, 2015 3:02 pm Post subject:
The other parameters on the DD should not cause a problem. Sometimes you need the DCB info, so I think correct without the space.
Back to top
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