Link to home
Start Free TrialLog in
Avatar of tcfrey
tcfreyFlag for United States of America

asked on

Spool Entries

Hello everyone,

I work for one of those companys that has the habit of keeping every spool file ever created for any reason on the system for all time.

I want to write some routines to pull off spooled data that is older than a specified date.  I know pretty much what to do as far as my application goes but here is my question.

What system files contain spool info?  I need a list of spool file number/Job/date etc. for all spool files on the system.  WRKSPLF will not let me direct output to a database file, which would be really nice.

Any information on how or where to accumilate this info would be appreciated.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Barry Harper
Barry Harper
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_276102
Member_2_276102

Minor note...

I expect Barry's program contains enough to do the job, so I don't need to comment there.

But, the basic question -- "What system files contain spool info?" -- leads to risky issues.

For good reason, the answer is "None."

Spooled file info isn't kept in files, at least not ones that we can make any good use of. Nor are they files that should even be opened for READ in any program outside of the spooling subsystem itself. Any access to spooled file info needs to be through the approved interfaces, either commands or the appropriate APIs. (Barry's program uses some of both.)

The "files" are not intended to be under DB2 control. Pointers and locks can be messed up if you use DB2 (or its APIs) to open them. Under earlier releases of OS/400, the content can be corrupted easily and your spooled files can be rendered effectively irretrievable. You didn't say what version you're running, though I don't know what version/release is tamper-proof in spooling anyway (if any).

Best is simply to avoid accessing the spaces other than through the interfaces designed for it.

Tom
Hi
i dowloaded a utility, mngsplf that allows you to delete, move, etc.. spool files based on various criteria including spacific users, outputq's, date & time, userdata.
If you are interested I can post set up a texfile on my website.

Dave