Thanks Buck - SQL should do the trick!
Many files are indeed *AFPDS.
DSPSPLF works great with *AFPDS files.
Unfortunately that type of spool file apparently doesn't allow a CPYSPLF to get it into a PF.
Any ideas how to get an image of the spool file into a PF? I would like to produce a list of all print files, along with a sample first page. So users can see the document and decide if they want it via email or PDF.
Fyi: doing inventory of all spool files to eliminate Iseries style printers on corporate campus, and go to emails or PDF printing on shared printer/copy machines.
Thanks!
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck Calabro
Sent: Wednesday, October 12, 2016 3:16 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: inventory spool files
On 10/12/2016 3:00 PM, Stone, Joel wrote:
I am tasked with doing an inventory of all spool files on our iseries.
Want counts of form types, etc.
Probably want the first page of each distinct report.
If all of the spooled files are *SCS that should be easy enough, but if
there are *USRASCII or *AFPDS it may be a more complex problem.
How can I collect all spool files in all outqs?
What version of IBM i are you on? That's helpful to know because there
are some significantly easier-to-write implementations in more current
releases. For 3xample, can you run the following SQL:
select * from qsys2.output_queue_entries where output_queue_library_name
= 'BUCK'
The general plan you laid out looks OK.
List all libraries
List all queues in each library
List all spooled files in each queue
Capturing the first page of every spooled file... hm. I'm assuming this
is for some sort of run book documentation; an example of the expected
output or something like that. I first thought of something like
CPYSPLF FILE(QPRTSPLQ)
TOFILE(*TOSTMF)
TOSTMF('/buck/qprtsplq.pdf')
WSCST(*PDF)
but there's no obvious way to grab only the first page. Now you could
CPYSPLF FILE(QPRTSPLQ) TOFILE(QTEMP/SPLF) CTLCHAR(*FCFC) and then write
a program to read that temporary file and in essence re-generate the
first page given the control code. See
http://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/rzalu/rzalupdf.pdf?view=kc
the section First-character forms-control data considerations for
details. Page 113.
As an Amazon Associate we earn from qualifying purchases.