You can attach a data queue to the output queue and it will receive an entry whenever a spool file is placed on the output queue (created), changed and printed.
You can then process the data queue and take the appropriate action. Carsten Flensburg posted an example RPG ILE program that monitors a data queue attached to an output queue at http://code.midrange.com/index.php?id=7b1edfd310
Hope it helps
REGISTER or login: