Even if "DISP=(SHR,DELETE)" would allow the deletion of expired data sets, it may not ALWAYS work. If another user has the file allocated (which is possible due to the SHR disposition) the DELETE will fail. (Or does the DELETE imply exclusive? I'm not logged on so I can't check right now).

Even with the " PGM=IKJEFT1A,PARM='DEL ''dsn'' PURGE' " solution, I suggest the addition of a DD statement that specifies DISP=OLD to ensure that your job has an exclusive ENQ for the data set.

Dan D
----- Original Message ----- From: ""גדי בן אבי"" <gad...@malam.com>
Newsgroups: bit.listserv.ibm-main
Sent: Wednesday, February 25, 2009 12:34 AM
Subject: Re: Deleting UnExpired dataset using JCL


Hi,

While that might work, it is not what the user wants.

The user would like to use DISP=(SHR,DELETE) or in other words, have access to the file, and if the step completes ok, delete the file.

If there is no solution that can emulate this behavior, then they will have to add an extra step that deletes the file if the previous step completes ok.

Gadi

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Ted MacNEIL
Sent: Tuesday, February 24, 2009 11:08 PM
To: IBM-MAIN@bama.ua.edu
Subject: Re: Deleting UnExpired dataset using JCL

Have you tried :

//DEL EXEC PGM=IKJEFT01
//SYSTSPRT  DD SYSOUT=*
//SYSTSIN   DD *
DEL 'V110.TGBA.TESTDEL' PURGE

There was an even simpler one with IKJEFT1A, and a PARM="DEL dsn PURGE".

It has come down to: "What is 'pure' JCL"?

To me, anything that goes through an Internal Reader is "PURE"!

-
Too busy driving to stop for gas!

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to