Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Why DD DUMMY,DSN=XXX is used ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Why DD DUMMY,DSN=XXX is used ?
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

Moderator Team Head


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

PostPosted: Tue Jul 20, 2010 3:19 pm    Post subject: Reply to: Why DD DUMMY,DSN=XXX is used ?
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    Post subject: Reply to: Why DD DUMMY,DSN=XXX is used ?
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    Post subject:
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: 2433
Location: Netherlands, Amstelveen

PostPosted: Tue Jul 20, 2010 4:02 pm    Post subject:
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

Senior Member


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

PostPosted: Tue Jul 20, 2010 5:39 pm    Post subject:
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

Senior Member


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

PostPosted: Tue Jul 20, 2010 5:43 pm    Post subject: Re: Reply to: Why DD DUMMY,DSN=XXX is used ?
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jul 20, 2010 5:47 pm    Post subject:
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

Senior Member


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

PostPosted: Wed Jul 21, 2010 9:55 pm    Post subject:
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 User


Joined: 31 Dec 2009
Posts: 440
Location: London

PostPosted: Mon Aug 16, 2010 10:21 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm
No new posts Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm
No new posts insert dummy record(Low values) to PS... useit DFSORT/ICETOOL 3 Wed Sep 24, 2014 4:20 pm
No new posts Generating an o/p file with dummy i/p... wiprov DFSORT/ICETOOL 2 Wed Sep 10, 2014 6:16 pm
No new posts Dummy a dataset while picking other c... hailashwin Mainframe Interview Questions 2 Thu Aug 21, 2014 1:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us