Page 1 of 1

What is NULLFILE and how it is different than DUMMY?

Posted: Wed Aug 14, 2013 9:12 am
by Anil
Hi,

Can any one explain me the difference between "DD DUMMY" and "DD DSN=NULLFILE". And when should one use DUMMY and when NULLFILE?

Re: What is NULLFILE and how it is different than DUMMY?

Posted: Wed Aug 14, 2013 4:20 pm
by Robert Sample
I encourage everyone to learn how to use the manuals. IBM makes (almost) their entire manual collection available on the Internet for free. If you had used this reference, and found the JCL Reference manual for your release of z/OS, you could easily have read about DSNAME:
12.22.2.9 Data Set Name for Dummy Data Set

NULLFILE

Specifies a dummy data set. NULLFILE has the same effect as coding the DD DUMMY parameter. NULLFILE must be coded as a single-word parameter. For instance, IBM does not support the use of NULLFILE to obtain a dummy data set for these (or other) formats:
When followed by a member name
As a qualifier in a qualified data set name
As a temporary data set name.
In other words, there is no difference between DD DSN=NULLFILE and DD DUMMY. Use which ever you prefer or your site standards require.

Re: What is NULLFILE and how it is different than DUMMY?

Posted: Thu Sep 05, 2013 11:27 pm
by Anil
Thanks Robert.

I've seen some of the JCLs which had DUMMY coded along with the DCB parameters, which is confusing. I read, understand that they need the DCB and checked for syntax - but it sounds not very convincing that something which is used just for "being dymmy" needs to have real DCB. :?

Re: What is NULLFILE and how it is different than DUMMY?

Posted: Fri Sep 06, 2013 12:58 am
by Robert Sample
Having DUMMY with DCB characteristics is an entirely different question than the original post. As I stated in another post, z/OS looks for DCB data first from the program, second from the JCL, and third from the data set. Since a NULLFILE or DUMMY data set does not provide DCB information, that means z/OS must get this vital (and required) information from the program or the JCL. Having the DCB on a DD DUMMY statement will prevent some problems if the program does not fully specify the DCB (such as using BLOCK CONTAINS 0 RECORDS in a COBOL program, which indicates the BLKSIZE will be provided in the JCL or via the data set).

Re: What is NULLFILE and how it is different than DUMMY?

Posted: Fri Sep 06, 2013 10:05 am
by Anil
Thank you Robert. I realized that I did mix two different questions, though, your answer is very helpful and made me understand this well.

Regards,