I know about IDCAMS, but the user wants a pure JCL solution.

Gadi

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of 
Mike Shorkend
Sent: Tuesday, February 24, 2009 2:17 PM
To: [email protected]
Subject: Re: Deleting UnExpired dataset using JCL

Gadi
Try using IDCAMS DELETE with the PURGE option
e.g.

//  EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
 DEL V110.TGBA.TESTDEL PURGE


Mike




On Tue, Feb 24, 2009 at 1:59 PM, גדי בן אבי <[email protected]> wrote:

> Hi,
>
>
>
> How do I delete a non sms dataset with an expiration date using JCL.
>
>
>
> If the dataset does not have an expiration date, I can use
> DISP=(SHR,DELETE).
>
> If the dataset is sms managed, the OVRD_EXPDT allows the override of the
> expiration date.
>
>
>
> Is there a way to accomplish this for non sms datasets?
>
>
>
> IF I run this job:
>
> //STEP1   EXEC   PGM=IEFBR14
>
> //DD1 DD DSN=V110.TGBA.TESTDEL,DISP=(,CATLG,DELETE),UNIT=3390,
>
> // SPACE=(TRK,1),LRECL=80,RETPD=2,VOL=SER=PRJ002
>
> //DEL EXEC PGM=IEFBR14
>
> //DD1 DD DSN=V110.TGBA.TESTDEL,DISP=(SHR,DELETE),RETPD=0
>
>
>
> The first step works, and the second step iisues:
>
> IEC614I SCRATCH FAILED - RC 008, DIAGNOSTIC INFORMATION IS (040B004B),
>
> ,PRJ002,V110.TGBA.TESTDEL
>
>
>
> The 040B004B reason code means that the dataset is not expired.
>
>
>
> Can anyone help?
>
>
>
> Gadi
>
>
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>



-- 
Mike Shorkend
[email protected]
www.shorkend.com
Tel: +972524208743
Fax: +97239772196

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] 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 [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to