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

dummy and temporary datasets


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
Reply with quote

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

Global Moderator


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

PostPosted: Tue May 27, 2008 4:21 pm
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
ksk

Active User


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

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

Hi,

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.

Code:
//QSAM0080 DD  DUMMY


The following is the COBOL SELECT statement.

Code:
SELECT QSAM0080-FILE
                  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).

Code:
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.

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

Hi,

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

- DUMMY

One such link for DUMMY is

www.ibmmainframes.com/viewtopic.php?t=23023&highlight=dummy

- TEMP
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..

www.ibmmainframes.com/about26679.html
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 Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts PL/I, VB Datasets and the RDW PL/I & Assembler 4
No new posts how to get list of all VSAM/non-VSAM ... JCL & VSAM 13
No new posts define 1 DCB parms for multiple outpu... JCL & VSAM 9
No new posts FTP datasets to server CLIST & REXX 13
Search our Forums:

Back to Top