Basically I have not been happier than any other point in my career!
I ran across the need to automate purging old spool file records and could not find any code close enough to cut, paste, compile, run and free. In the past have used TAATOOL but is not currently an option.
My good buddy Rick Santiago has a purge out queue by date program that he wrote a while back. Short and sweet I quickly envision modifying for my needs.
Through iSeries navigator I created a table with four fields, out queue name, out queue library, number of days to keep spool file entries and user data.
I also added the following key constraints, C_OUTQUE, C_OUTLIB and C_USRDTA as unique.
Follow your nose and instructions in the comments of the CL and you’ll have a quick little program you can add to your nightly process.
Hopefully this help some other poor one man band quickly solve a minor annoyance programmatically.
CLNOUTQ is the driver and CLNOUTQ2 exists due to only being able to use one RCVF in a CL in a read loop and detect end of file.
CLNOUTQ
CLNOUTQ2
~Richard
Try to discover
The road to successAnd you'll seek but never find,
But blaze your own path
And the road to success
Will trail right behind.
~Robert Brault, www.robertbrault.com
No comments:
Post a Comment