Page 1 of 1

Find files older than a year.

Posted: Tue Apr 08, 2014 5:28 pm
by Ashish Mathew
Hi,

Can anyone please adviseme on uhe utilities using which we can find the files on DASD, that are older than 365 days on a system?

Thank you

Re: Find files older than a year.

Posted: Tue Apr 08, 2014 6:46 pm
by enrico-sorichetti
You have a few alternatives ...

ISMF dialogs

DFDSS

DCOLLECT
but You will have to write Your own post processor
( file 206 of the CBT tape has some very nice examples )

for dfdss here is a hint

Code: Select all

 000005 //DSS     EXEC PGM=ADRDSSU,REGION=0M,
 000006 //             PARM='TYPRUN=NORUN'
 000007 //SYSPRINT  DD SYSOUT=*
 000008 //SYSIN     DD *
 000009   DUMP -
 000010        DATASET( -
 000011                 INCLUDE( -
 000012                          <some high level qualifier>.** -
 000013                        ) -
 000014                 BY( REFDT LT (*,-365) ) -  
 000015               ) -
 000016        OUTDDNAME(OUT)
 000017 //OUT       DD DUMMY

Re: Find files older than a year.

Posted: Tue Apr 08, 2014 6:57 pm
by Robert Sample
When you say "older than 365 days" do you mean that the data sets were CREATED more than 365 days ago, or data sets that were last REFERENCED more than 365 days ago?

Re: Find files older than a year.

Posted: Tue Apr 08, 2014 7:13 pm
by enrico-sorichetti
IMO the TS , given the DFDSS snippet provided,
should be able to infer the keyword to be used for create date instead of the reference date
( reading the manual - naturally )