Spool file management
Inside VESOFT covers
tips and techniques you can use with VESOFTs products,
especially MPEX. As always, I am totally open to getting input from
you users of MPEX, Security/3000 or VEAudit/3000 it helps me
learn, too. Send me your tricks, and well get a 3000 for
2000 cap out to you as our thanks.
In any case, MPEX quickly rose to the challenge and implemented all sorts of nifty commands and file objects to manage spool files a number of years ago, but many people are still unaware of the bulk of them. So as is the purpose of this column, we will spend some time going over them, so you have even more tools at your disposal.
So first, the most common command would be SHOWOUT.
What you will notice is the (SPOOL.????) Syntax. This is how you select the spool attribute variables that you are going to want to work on. These will apply to SHOWOUT, ALTSPOOLFILE and DELETESPOOLFILE. There is an accessible attribute for virtually any spool file characteristic that you can name. Im not going to regurgitate them here, you can see them explained very clearly in the manual.
The output from SHOWOUT
looks like the sample that follows.
A related command is
SHOWOUTJ, which is really a special purpose version of SHOWOUT. It
was originally implemented in VESOFT tech support back when I was
working there (but not by me). The idea behind SHOWOUTJ is to make it
easy to identify all of the spoolfiles generated by a particular
Here is a quick example of
deleting all the $STDLIST files that have been sitting around for a
And of course ALTSPOOLFILE
will work in a similar fashion.
Now to the bit that is the most confusing to me, and that is working on spool files in a REPEAT..FORFILES loop. Its just confusing because you have to add a couple of extra pieces of information, and the MPEXCURRENTFILE variable will contain the DFID string: something like #O1234 instead of the standard FILE.GROUP.ACCOUNT that you are used to.
The format of the REPEAT..FORFILES loop is pretty much the same as you are used to except for some additions to the FORFILES directive. So something like this:
Here we would operate on all the $STDLIST files with a priority of 1. You will notice the :SPOOL at the end: this is critical so that MPEX knows where to look for the fileset. Inside the REPEAT loop you access the spool attribute values as SPOOL.attr instead of the familiar RFILE.attr. So for example, if I wanted to display the MPE user ID of the creator of the $STDLIST then I would say ECHO ![SPOOL.USER].
There are some fun and interesting possibilities with the MPEX spooler interface, and some advantages over third party spoolers. Most, if not all, third party spoolers will redirect various SPOOLF and LISTSPF commands into a temp file and massage the output for you. In some cases the number of spool files that qualify is larger than the temp file they create, and you have problems. MPEX doesnt seem to have this problem.
A case in point: I had a
situation where some unknown program was generating tens of thousands
of empty spool files a day, each with only one or two blank lines in
it. If the background process in our third party spooler came down
for more than an hour or so, it couldnt purge the files anymore
because too many qualified. I converted this to an MPEX
DELETESPOOLFILE command and we never had any more trouble with it,
and it had lower overhead. The reason we had all these empty spool
files is another story, for another day.
Copyright The 3000 NewsWire. All rights reserved.