0 pts.
 Printing from RPG based program straight to printer without going thru output queu
Hi I need to change by inhouse RPG programs to print direct to the printer output queue without going through the spool files. Anybody knows how can this be done? Is there any CL programming required? Thanks

Software/Hardware used:
ASKED: November 12, 2006  10:40 PM
UPDATED: December 25, 2009  4:56 AM

Answer Wiki:
This can be done two different ways. You can use the "OVRPRTF" giving the device(printer) name and "SPOOL *NO". The other way, create the print file with the same parameters as stated above. NOTE: Word of warning, if this printer has a writer started, any spooler member that comes in will print between the pages of the direct report.
Last Wiki Answer Submitted:  November 13, 2006  7:31 am  by  MDratwa   645 pts.
All Answer Wiki Contributors:  MDratwa   645 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

In the previous answer, the first method (ovrprtf) will require CL programming unless you are running the program manually and do a manual override.

The second method will not. Create the printer file with SPOOL(*NO) and use that name in the RPG program.

 0 pts.

 

Note that in the answer above, the second alternative will also require CL since it takes CL to create or compile a printer file.

If the response is that it doesn’t require CL “programming”, then the first method doesn’t require CL “programming” either. The RPG program can pass the OVRPRTF command to QCMDEXC before opening the file just as CRTPRTF is passed to QCMD when run interactively.

RascallyTom

 108,135 pts.