Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
dummy and temporary datasets

Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
harsha vardhan

New User

Joined: 25 May 2008
Posts: 1
Location: hyderabad

PostPosted: Tue May 27, 2008 4:13 pm    Post subject: dummy and temporary datasets
Reply with quote

Explain the use of dummy and temporary datasets with coding
Back to top
View user's profile Send private message


Global Moderator

Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Tue May 27, 2008 4:21 pm    Post subject:
Reply with quote

a dummy ds is a dd parm that indicates that there is to be no dataset allocated.

you can use the dd dummy parm on an output ds that you no longer want to generate,
or you can use it to simulate an empty input file file.

you can also use it as a place holder dd that can be overriden

temporary ds are only allocated for the life of the job. at the end of job, the temporary ds are deleted.

no coding involved as these are dd statement parms. (though I guess one could call creating JCL as coding) - (but I will bet money that that is not what you meant by coding).
Back to top
View user's profile Send private message

Active User

Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Tue May 27, 2008 4:26 pm    Post subject:
Reply with quote


DUMMY Dataset:

The use a a DD statement with a DUMMY parameter will allow a program to run if a data set does not exist. The following example show a DD DUMMY statement.


The following is the COBOL SELECT statement.

                  ASSIGN       to QSAM0080
                  ORGANIZATION is SEQUENTIAL
                  ACCESS MODE  is SEQUENTIAL
                  FILE STATUS  is QSAM0080-STATUS.

The following shows the COBOL statements for the open, read and close of the QSAM0080 data set (i.e. sequential file).

open input QSAM0080-FILE
           read QSAM0080-FILE.
           close QSAM0080-FILE

In the preceding example the OPEN will be successful, the first READ will return an End-of-File return code and the close will be successful.

Temporary Datset:

A dataset that exists on either DASD or TAPE only during the execution of the jobstream that creates it and it will be deleted after execution of the job.

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 May 27, 2008 7:21 pm    Post subject:
Reply with quote


These thing has been discussed earlier as well, please search the forum.


One such link for DUMMY is


In JCL you just have to write DSN=&&TEMP instead of DSN=XXXX.X.XXXX.XXX. to create a temporary dataset. To use this temporary dataset just use &TEMP wherever you want the use the temporary data. I hope this answers a part of your question.

As far as usage part is concerned. I believe the temporary datasets are generally used to save space allocation and deallocation time. I mean just take a case where a Procedure generates an ouput now you jus need to send the output via some Mailing Procedure you have, right. So just mail that temp. dataset using &TEMP. At the end of the execution the temporary dataset get removed but if i would have used a permanent dataset then i had to use IEFBR14 to delete the file at the end of JCL so as to deallocate the dataset.

One thing about temp to remember, temp files are ussually used as DSN=&&TEMP, some more are here in this links..

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
This topic is locked: you cannot edit posts or make replies. Unavailable RECON datasets while exec... abdulrafi JCL & VSAM 10 Fri Apr 06, 2018 12:45 pm
No new posts Creation of Datasets dynamically on t... Raghu M N DFSORT/ICETOOL 8 Fri Mar 16, 2018 12:56 am
No new posts Enterprise PL/I - dynamic allocation ... prino PL/I & Assembler 1 Mon Jan 29, 2018 10:17 pm
No new posts DUMMY When do I need add a DCB parameter Martylin JCL & VSAM 3 Fri Dec 08, 2017 7:20 am
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am

Back to Top
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us