View previous topic :: View next topic
|
Author |
Message |
msgpk
New User
Joined: 22 Jan 2008 Posts: 7 Location: India
|
|
|
|
Hi,
what is the difference between Disp=(new,pass,delete)
and
DSN=&&temp?
Both are temporary files |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
One is a disposition statement and the other is a dataset name statement.
Two different animals. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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.. ..? |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
You'll get a JCL ERR with dupe &&temp in the same job. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
tangentray
New User
Joined: 30 Dec 2006 Posts: 20 Location: Kolkata, India
|
|
|
|
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 |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
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 |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
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 |
|
|
|