Thanks, Scott. Great ideas. I didn't know about the catsplf utility. I'll use that. No QSH on the V4R5 box, though, so I'll have to work around that. Also a great idea with WRKOUTQ from QSH and pipe results to a file. Might also work with WRKSPLF as all the spooled files have a unique userid but not a unique outq.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-
bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Wednesday, July 10, 2013 2:24 PM
To: Midrange Systems Technical Discussion
Subject: Re: Parse Spooled Files

hi Dan,

In recent releases QShell has a 'catsplf' utility that can be used to
read a spooled file (which in turn could be piped to the grep command.)
Unfortunately, I don't think this existed at V4R5. (Though, it might
be worth going into QShell and typing the catsplf command to see if it
exists.) It definitely exists at 7.1, however....


You would need to get a list of the spooled files, though, you'll need
the jobid, spooled file name and spooled file number to use catsplf (or
CPYSPLF for that matter.) A simple way to do that in a one-off program
might be to use WRKOUTQ command. If you run this via QShell, it'll
automatically take the *PRINT option and redirect the spooled file to
the screen, so from QShell, you'd do

$ system 'WRKOUTQ OUTQ(The-OutQ)'

You'd then need to write a loop to spin through the output of that
command, which would be pretty easy to do in a shell script.


This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page