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
 

 

Difference bw DISP=(new,pass,delete) and DSN=&&temp

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

New User


Joined: 22 Jan 2008
Posts: 7
Location: India

PostPosted: Thu Jun 12, 2008 12:02 pm    Post subject: Difference bw DISP=(new,pass,delete) and DSN=&&temp
Reply with quote

Hi,


what is the difference between Disp=(new,pass,delete)

and

DSN=&&temp?


Both are temporary files
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: Thu Jun 12, 2008 12:04 pm    Post subject:
Reply with quote

One is a disposition statement and the other is a dataset name statement.

Two different animals.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 12, 2008 1:17 pm    Post subject:
Reply with quote

Hello,

Quote:
Both are temporary files
Why would you think so?

There is nothing in disp=(new,pass,delete) that defines a temporary file.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Thu Jun 12, 2008 1:38 pm    Post subject:
Reply with quote

Hi,

One of my PROC uses this:
Code:
//PGREPORT DD  DSN=&&TEMPFILE,               
//             UNIT=&SYSDA,AVGREC=M,         
//             DATACLAS=LARGE,               
//             DSORG=PS,RECFM=FBA,LRECL=143, 
//             BLKSIZE=0                     


Other PROC uses
Code:
//OTEMPFIL DD  DSN=&&TEMPFIL,               
//             DISP=(NEW,DELETE,DELETE),   
//             RECFM=FB,LRECL=160,BLKSIZE=0,
//             UNIT=&SYSDA,                 
//             DATACLAS=LARGE,             
//             MGMTCLAS=WORK               


What's Your opinion now.. icon_wink.gif ..?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Jun 12, 2008 2:15 pm    Post subject:
Reply with quote

Hi Anuj,

I'm not sure, it's probably just me but I find some of your replies as very cryptic.


Gerry
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 961
Location: Richmond, Virginia

PostPosted: Thu Jun 12, 2008 5:51 pm    Post subject:
Reply with quote

You can use a regular dataset name with the DISP=(NEW,PASS,DELETE) option.

If a succeeding step fails, but before the dataset was deleted, then I think the dataset is still there, but since it is not catalogued, you need to find the VOL from the JESlog.

Is this correct?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Thu Jun 12, 2008 6:14 pm    Post subject:
Reply with quote

gcicchet wrote:
I'm not sure, it's probably just me but I find some of your replies as very cryptic.
Not sure about others but perhaps this reply could be considered as "cryptic"..

In the original question TS (Thread Starter) has assumed (per me) that "Disp=(new,pass,delete)" can be used only for Temp files & Temp files can use only this DISP. I've given two other examples of using DISP with Temp files to make him think that the example in his post is not the only case with Temp files...
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 12, 2008 6:29 pm    Post subject:
Reply with quote

Hi Anuj,

Quote:
What's Your opinion now..
I don't see how the examples you posted relate to how "new,pass,delete" signifies a temporary file. . .

The issue was the "pass" for a non && dataset and those examples show only && datasets.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Jun 12, 2008 7:08 pm    Post subject:
Reply with quote

Hi Anuj,

Your first code snippet shows no DISP= parameter, so the default DISP=(NEW,DELETE) applies.

Both snippets have DSN=&&TEMPFILE, so both are temp datasets.

Regards,
Garry
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Jun 12, 2008 11:22 pm    Post subject:
Reply with quote

The OP asked:
Quote:
what is the difference between Disp=(new,pass,delete)

and

DSN=&&temp?


One difference is that you can get a JCL err when attempting to allocate a permanent file that already exists, whereas, with && you won't. The sys uniquely names temp files.
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 961
Location: Richmond, Virginia

PostPosted: Fri Jun 13, 2008 5:46 pm    Post subject:
Reply with quote

You'll get a JCL ERR with dupe &&temp in the same job.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jun 14, 2008 8:45 pm    Post subject:
Reply with quote

My point was that if, in a previous execution the file was left as is (on rare occasions the system fails, leaving files undeleted). Most shops have mopup routines that delete temp files after such an incident.

When I ran my test I didn't get a JCL err. I thought it might be because the sys uses systime as part of the temp DSN, and that made the DSNs unique. But strangely they both had the same DSN (including the time). I noticed that they were assigned to 2 different storage groups by SMS. Maybe that keeps them unique or they were assigned to different vols.

I didn't try writing to the files, but in any event that would cause an abend or a bad RC, not a JCL error.
Back to top
View user's profile Send private message
tangentray

New User


Joined: 30 Dec 2006
Posts: 20
Location: Kolkata, India

PostPosted: Mon Jun 16, 2008 5:06 pm    Post subject:
Reply with quote

I believe there is a confusion regarding the intent of the TS. My understanding of the question is a s follows: (TS please correct me if I am wrong)

Normally when we define a temporary dataset (&&filename) we specify a DISP=(NEW,PASS,DELETE), what happens if we define a permanent dataset using the same DISP, will it act similar to a temporary dataset? If no then in what way will it differ?

I do not have a complete answer to this, experts please comment. As far as I know from my limited exposure that a temporary dataset is one that will be deleted at the end of the job, is it actually deleted? I guess not, it is merely uncataloged and resides in a system managed volser. As long as the system does not require that space to be reallocated elsewhere, it will not be physically deleted. On the other hand if we define a permanent
dataset with the abovde disp, i think as far as the job is concerned it will behave just like a temporary dataset, but if it is not deleted explicitely then it will remain as uncataloged as long as it is not deleted externally. That is what i think, please post ur thoughts.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Jun 16, 2008 5:11 pm    Post subject:
Reply with quote

A temporary dateset (&&somename) is unknown outside of the job defining it, but a permanent dataset with a disp of (nrew,pass,delete) could cause a conflict with another job running at the same time.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Jun 16, 2008 5:37 pm    Post subject: Reply to: Difference bw DISP=(new,pass,delete) and DSN=&
Reply with quote

Code:
000001 //IBMUSERA JOB CLASS=A,NOTIFY=&SYSUID,
000002 // MSGCLASS=X
000003 //S1  EXEC PGM=IDCAMS
000004 //DS1     DD DISP=(NEW,PASS,DELETE),DSN=IBMUSER.DS1,
000005 // UNIT=SYSDA,SPACE=(CYL,(1,1)),DCB=(RECFM=FB,LRECL=80)
000006 //SYSPRINT DD SYSOUT=*
000007 //SYSIN DD *
000008   SET MAXCC = 0
000009 //S2  EXEC PGM=IDCAMS
000010 //DS2     DD DISP=(NEW,PASS,DELETE),DSN=IBMUSER.DS2,
000011 // UNIT=SYSDA,SPACE=(CYL,(1,1)),DCB=(RECFM=FB,LRECL=80)
000012 //SYSPRINT DD SYSOUT=*
000013 //SYSIN DD *
000014   SET MAXCC = 0


is a perfectly legal jcl
at job termination all the datasets allocate with PASS will be delete

if things have been setup properly, there will not be any name clashes

in order not to have any cleanup to do a jcl could be setup using
(NEW,PASS) for non temporary datasets
whit a last step with (OLD,CATLG),
in case of abnormal/condition_code_driven termination
the job could be rerun without any modifications

it would incur in jcl errors if rerun inappropriately

the jcl has been tested
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Mon Jun 16, 2008 6:11 pm    Post subject:
Reply with quote

I think Expat had given the only correct answer to that question of the TS.

All others deal with temp-datasets and how to fedine and handle them.
But the question was about the difference of two JCL-Statements. :-)

Regards, UmeySan
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 JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm
No new posts FTOPEN TEMP is failing due to dataset... mbenaud TSO/ISPF 7 Thu Jul 28, 2016 4:28 pm


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