I understand that a Data Queue is an efficient way to monitor an output queue. Using QRCVDTAQ will allow the program to "sleep" until a new spool file appears on the output queue or if a spool file in the output queue changes from HLD to RDY.
However what about the RDY spool files that are already in the output queue when the program, that issues the call to QRCVDTAQ, starts?
It seems like that program will never find out about those spool files unless their status is changed from HLD to RDY.
Is there a way, other than a call to QUSLSPL, for the output queue monitoring porogram to find out about RDY spool files that are already in the output queue when it starts?
Software/Hardware used:
OS/400
ASKED:
October 5, 2011 12:09 AM
UPDATED:
March 31, 2012 12:39 AM
It seems like that program will never find out about those spool files unless their status is changed from HLD to RDY.
If a data queue is associated with an output queue that already lists spooled files in RDY status, then those spooled files will not cause a data queue entry to be generated. From the time the data queue association is established, entries are generated by spooled files going to RDY status. Entries can’t be generated for past events.
But that’s rarely a consideration. Those circumstances should only exist at the very beginning of using the data queue. You can always simply toggle the status manually for those spooled files. If there are too many, then use iSeries Navigator to do them all at once.
Is there a way, other than a call to QUSLSPL, for the output queue monitoring porogram to find out about RDY spool files that are already in the output queue when it starts?
There are multiple ways. But why look for harder ways than with QUSLSPL? (Try creating a spooled output monitor for Windows.)
The Example: Deleting old spooled files topic provides source code in OPM RPG, COBOL and C. The Examples: Processing data queue entries topic shows a data queue example in CL.
Tom