What is NULLFILE and how it is different than DUMMY?

JES2/3, JCL, utilities.
Post Reply
Anil
Registered Member
Posts: 70
Joined: Sun Jun 16, 2013 12:41 am

What is NULLFILE and how it is different than DUMMY?

Post 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?
Thanks,
Anil
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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.
Anil
Registered Member
Posts: 70
Joined: Sun Jun 16, 2013 12:41 am

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

Post 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. :?
Thanks,
Anil
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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).
Anil
Registered Member
Posts: 70
Joined: Sun Jun 16, 2013 12:41 am

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

Post 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,
Thanks,
Anil
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”