Try playing around with DFDSS with JCL like this and DEFINITELY test with 
TYPRUN=NORUN before running it live. 

//CATCLEAN EXEC  PGM=ADRDSSU,PARM='TYPRUN=NORUN',         
//  REGION=8M                                             
//SYSUT2 DD DUMMY                                         
//*YSU03 DD DISP=SHR,UNIT=SYSDA,VOL=SER=TSOS03            
//SYSIN DD *,DCB=BLKSIZE=80                               
 DUMP              -                                      
     OUTDD(SYSUT2) -                                      
     DATASET (INCLUDE (BF19.**) -                         
        BY ((CREDT,LE,*,-1)))   DELETE                        
/*                                                        
//SYSOUT   DD SYSOUT=*                                    
//SYSPRINT  DD SYSOUT=*                                   
//SYSUDUMP  DD DUMMY                                      

You can change the INCLUDE statement to be what you want and then change the BY 
parameter to be -365 instead of -1.  
The dummy output will make sure the datasets are deleted when it finishes. 

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Ron Thomas
Sent: Thursday, January 12, 2017 2:28 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: delete old datsets

Hi . Could some one let me know how to delete old datasets SPXR3V.TEST.*say  1 
year old  old using a job ?  I need to get this scheduled as a monthly process 
so that storage  gets freed.  Thanks!

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN



This email transmission and any accompanying attachments may contain CSX 
privileged and confidential information intended only for the use of the 
intended addressee. Any dissemination, distribution, copying or action taken in 
reliance on the contents of this email by anyone other than the intended 
recipient is strictly prohibited. If you have received this email in error 
please immediately delete it and notify sender at the above CSX email address. 
Sender and CSX accept no liability for any damage caused directly or indirectly 
by receipt of this email.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to