85 pts.
 Delete files from IFS based on last used age
I need a non-C program that will delete files from a directory and its subdirectories in the IFS based on a user specified number of days since the last time it was used. Does anyone have such a program or product (or a suggestion for the easiest way to accomplish this)?

Software/Hardware used:
ASKED: April 28, 2006  11:11 AM
UPDATED: May 1, 2006  10:01 AM

Answer Wiki:
look at this RPG tool : http://jplamontre.free.fr/AS400/DSPIFS.htm it walks IFS, can show data inside file. In the code, there is 3 calls to the 'stat' api : rc = stat (pathdirs: myStat ); rc = stat64 (pathdirs: myStat64 ); rc = statvfs(pathdirs: myStatVFS ); here is one solution to your question: data returned by these stat procedure contains many information, the one you are interested is st_atime Time of last access I am not in front of my SystemI5, so I don't know what is the unit used in st_atime. It can be the number of seconds since epoch (1970-01-01-00:00:00:000000)
Last Wiki Answer Submitted:  April 30, 2006  4:45 am  by  JPLamontre   0 pts.
All Answer Wiki Contributors:  JPLamontre   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

We use TAATOOL (http://www.taatool.com/). The have command CVTIFS that builds a file for the IFS similar to the DSPOBJD file. I wrote a CL to read the file and delete the IFS files older than 14 days.

 0 pts.