I think I understand what you are looking for… you want to know the name of the original output queue defined in a particular printer file.
Before the print program is invoked, use the following command to collect the *SPOOL attributes of your printer file into a temporary work file:
DSPFD FILE(Printer_File) TYPE(*SPOOL) OUTPUT(*OUTFILE) OUTFILE(QTEMP/PrtfDta)
The *OUTQ name can then be retrieved as &SPOTQL/&SPOUTQ from the QTEMP/PrtfDta file.
================================== MORE INFORMATION ON THIS TOPIC ==================================
The Best Web Links: tips, tutorials and more.
Ask your OS/400 questions -- or help out your peers by answering them -- in our live OS/400 discussion forums.
Ask the Experts yourself: Our OS/400 gurus are waiting to answer your questions.
Check out this Search400.com Featured Topic: 20 ways to ensure a smooth OS upgrade
This was first published in June 2004