IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Why DD DUMMY,DSN=XXX is used ?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
amajhi

New User


Joined: 21 Jul 2006
Posts: 18
Location: Pune

PostPosted: Tue Jul 20, 2010 3:02 pm
Reply with quote

Hi,

I am looking into one JCL and found for one of the DD statement it is coded as :

DD DUMMY,DSN=(DSNNAME),DISP=(NEW,CATLG,DELETE)

So can any one plz expain why DSN name is given along with DUMMY ?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Jul 20, 2010 3:19 pm
Reply with quote

I have no idea, unless it was coded like that in a PROC.

Maybe the coder just wanted to document what dataset that DD used to use?
Back to top
View user's profile Send private message
amajhi

New User


Joined: 21 Jul 2006
Posts: 18
Location: Pune

PostPosted: Tue Jul 20, 2010 3:45 pm
Reply with quote

In the JCL it is mentioned as :

//G.DM4 DD DUMMY,DSN=Dsnname,DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(1,1)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=23440)

While DM4 is an output file.
Back to top
View user's profile Send private message
amajhi

New User


Joined: 21 Jul 2006
Posts: 18
Location: Pune

PostPosted: Tue Jul 20, 2010 3:55 pm
Reply with quote

I think job will not create new file rather it will treat that DD as Dummy one.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Jul 20, 2010 4:02 pm
Reply with quote

One use of the DUMMY parameter is in testing a program. When testing is finished and you want input or output operations performed on the data set, replace the DD DUMMY statement with a DD statement that fully defines the data set.

Another use of the DUMMY parameter is in a cataloged or in-stream procedure. Code on the DD DUMMY statement all the required parameters. When the procedure is called, nullify the effects of the DUMMY parameter by coding on the DD statement that overrides the DD DUMMY statement a DSNAME parameter that matches the DSNAME parameter on the DD DUMMY statement. For example, procedure step PS contains the following:




//DS1 DD DUMMY,DSNAME=A,DISP=OLD


Nullify the DUMMY parameter by coding:



//JS EXEC PROC=PROC1
//PS.DS1 DD DSNAME=A
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Jul 20, 2010 5:39 pm
Reply with quote

The DUMMY parameter specifies that no device is to be allocated to this DD statement and that no disposition processing or I/O is to be done. All other JCL parameters on a DUMMY DD statement have to be syntactically correct. Use the DUMMY parameter if you know you will not need a file in a job step.So by this,
Quote:
DD DUMMY,DSN=(DSNNAME),DISP=(NEW,CATLG,DELETE)
may be the original programmer wanted to say that one can override this DSN with some "actual" Data-set later.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Jul 20, 2010 5:43 pm
Reply with quote

amajhi wrote:
In the JCL it is mentioned as :

//G.DM4 DD DUMMY,DSN=Dsnname,DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(1,1)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=23440)

While DM4 is an output file.
(by bold text) I believe, you meant DD-name for some output file. Do you have some step named as "G" in your JCL?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jul 20, 2010 5:47 pm
Reply with quote

Anuj,

That looks like an override for a PROC

procstepname.DDname DD whatever info to follow
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jul 21, 2010 9:55 pm
Reply with quote

Yes expat that could be - my intention was to say (once I could get the answer from OP), with the piece of code shown, that the user wnats to treat DSN associated with DM4 (the ddname) as DUMMY.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Mon Aug 16, 2010 10:21 pm
Reply with quote

I prefer to make the DUMMY a symbolic value so you don't have to change the PROC and just change the symbolic value in the execution JCL.

e.g.

Dummied
//JS EXEC PROC=PROC1,D='DUMMY,'
//DS1 DD &D.DSNAME=A,DISP=OLD

Undummied..
//JS EXEC PROC=PROC1,D=''
//DS1 DD &D.DSNAME=A,DISP=OLD
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts DUMMY When do I need add a DCB parameter JCL & VSAM 3
No new posts DD DUMMY & CPU TIME Testing & Performance 16
No new posts Sticky: Difference between DUMMY and NULLFILE JCL & VSAM 0
No new posts insert dummy record(Low values) to PS... DFSORT/ICETOOL 3
No new posts Generating an o/p file with dummy i/p... DFSORT/ICETOOL 2
Search our Forums:

Back to Top