Cleaning Up RSE Detritus
January 19, 2011 Hey, Ted
Note: The code accompanying this article is available for download here.
While doing some year-end house (disk) cleaning, I ran across the temporary source files that CRTSQLRPGI uses when run from RSE (WDSC or RDx), which are named EVFTEMPF01 and EVFTEMPF02. I knew about these files but never paid much attention to them. Today I discovered that there were 20 files (10 of each type) with total size of 45MB.
I wrote the attached clean-up program and a command interface. I scheduled the command to run every weekend.
I didn’t clear the file at the end so I can look at the file during the week to see what it deleted. The result of my decision is that if no event files exist, the program tries to delete the files it deleted on the last run.
I appreciate Tim’s sharing his application with the rest of us. Tim calls his command CLNUPEVF, and the command-processing program is CLNUPEVFCL.
Tim’s program loads the names of the event files into QGPL/EVFTEMPFXX. Before you can compile the CL program, you’ll have to create that file by hand from a CL command line. If you don’t want to put it in QGPL, use another library of your choice.
DSPOBJD OBJ(*ALL/EVFTEMPF01) OBJTYPE(*FILE) + OUTPUT(*OUTFILE) OUTFILE(QGPL/EVFTEMPFXX)
It’s amazing how much disk space little junk like this can eat up.