Find files older than a year.

Virtual Storage Access method - ESDS, KSDS, RRDS & LDS. Basic direct access method, Basic sequential -, Queued sequential -, Basic partitioned -, Indexed sequential -, Object - access method.
Post Reply
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

Find files older than a year.

Post 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
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Find files older than a year.

Post 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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Find files older than a year.

Post 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?
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Find files older than a year.

Post 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 )
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM.”