Have you tried the Retrieve Output Queue Information (QSPROUTQ) API ?
===========================================================
Enable job accounting. Create a journal receiver. Create journal QSYS/QACGJRN and attach the receiver to it. Set system value QACGLVL to *PRINT.
All print activity will then be logged in QACGJRN.
Tom
Last Wiki Answer Submitted: November 26, 2009 10:29 am by Satsho1,245 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
You could make it a monitored printq, and add a logging recorder into the data queue handler. you’d have a log of what was released ( therefore, we assume, printed) that was up to the millisecond.
in the section about OUTQ’s you will find how to create an associated data Q.
When a spooled item becomes ‘Ready’ , the Data Q is notified. Your program takes the entry details from the Q, and writes them to a file. I referred to this program as a recorder. You need to write it.
As a means of recording all details of all items – this is the bees leg joints.
Heres the bit from the book
Specifies the data queue associated with the output queue. Entries are logged in the data queue when spooled files are in ready (RDY) status on the output queue. A user program can determine when a spooled file is available on an output queue using the Receive Data Queue API (QRCVDTAQ) to receive information from a data queue.
Each time a spooled file on the output queue reaches RDY status, an entry is sent to the data queue. A spooled file can have several changes in status (for example, RDY to held (HLD) to release (RLS) to RDY again) before it is taken off the output queue. These status changes result in entries in the data queue for a spooled file each time the spooled file goes to RDY status.
D Data Ds
D function 10
D type 2
D job_name 10
D user_name 10
D job_number 6
D spool_file 10
D spool_num_bin 8b 0
D outq_name 10
D outq_library 10
D 56
If AUDITING is turned on and system value QAUDLVL contains *SPLFDTA and *PRTDTA you could extract the SF and PO entries from the audit journal. You would need to interpret the different journaling codes, but you would get a good idea of what happens with spoolfiles on your system.
I used this to track obsolete output queues and devices.
You could make it a monitored printq, and add a logging recorder into the data queue handler. you’d have a log of what was released ( therefore, we assume, printed) that was up to the millisecond.
Hi, Yorkshireman
How do I create a monitored printq?! and what is a logging recorder – terms look new to me, appreciate you help on this!
Sorry, I forget not everyone knows all the corners of the i5 maze.
If you review
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/clpdf/SS1-6.pdf
in the section about OUTQ’s you will find how to create an associated data Q.
When a spooled item becomes ‘Ready’ , the Data Q is notified. Your program takes the entry details from the Q, and writes them to a file. I referred to this program as a recorder. You need to write it.
As a means of recording all details of all items – this is the bees leg joints.
Heres the bit from the book
Specifies the data queue associated with the output queue. Entries are logged in the data queue when spooled files are in ready (RDY) status on the output queue. A user program can determine when a spooled file is available on an output queue using the Receive Data Queue API (QRCVDTAQ) to receive information from a data queue.
Each time a spooled file on the output queue reaches RDY status, an entry is sent to the data queue. A spooled file can have several changes in status (for example, RDY to held (HLD) to release (RLS) to RDY again) before it is taken off the output queue. These status changes result in entries in the data queue for a spooled file each time the spooled file goes to RDY status.
Here’s the layout for the data queue:
If AUDITING is turned on and system value QAUDLVL contains *SPLFDTA and *PRTDTA you could extract the SF and PO entries from the audit journal. You would need to interpret the different journaling codes, but you would get a good idea of what happens with spoolfiles on your system.
I used this to track obsolete output queues and devices.