CLNSPL
-
cleanup old spools
|
Cette
page a été mise
à jour le14
septembre
2009. |
|
Target
:
delete
old
spool files depending on their age
Characteristics
:
RPG,
User space
and pointers : the shortest code I've do to explore a list of spools
Sample :
Cleanup old spools (CLNSPL) |
Yet
an other
spool cleaner.
I
made this
tool a day I was on a site without internet access. (yes, it's already
possible
today). Not possible to get a free existing tool on the web.
Because I was in position to write again a spool-list-reader, I decide
to make
it a little spicy.
I've
try to
answer this question : what is the lesser number of RPG calculation
statement
required to walk a spool-file-list ?
The
answer is 4 :
the first is the API to get the list
// get list of spools
|
the
second if
the API to get a pointer on the list (LAH mean List-Api handler)
// use LAH as a mask to format & read the user space |
the
third is a
FOR to loop the list :
for iSpl= 0 to lah.count - 1; |
the
forth is to
get the data from one entry of the list :
// get data to load element |
last version : The SaveFiles