If he copies QPRINT to REPORT then will he even need to do OVRPRTFs for
I believe if you create a printer file called report, then you can do a
ovrprtf for file report and it will work. I believe we did it long ago
for Print, Print1 etc.
date: Thu, 31 Jul 2008 13:58:51 -0500
from: Jerry Adams <Jerry@xxxxxxxxxxxxxxx>
subject: OVRPRTF Command in OCL for RPG II Report
I have a boatload of legacy RPG II programs that run via OCL in the 36
environment. I've used OVRPRTF commands in OCL before, but always for
things like Query/400 reports.
I've written a generate command and processing program that build the
appropriate OVRPRTF command. So far, though I've only used this in CL's.
I would like to use it in OCL, too, because, among other things, it can
automatically use a substitute printer, rather than the normal one, when
the printer has, well, gone south temporarily.
Anyway, while my command and program build and execute the OVRPRTF command
successfully, the OCL sends the report to printer defined in the QPRTDEV
system value; i.e., it is ignoring the print device in the generated
I am pretty sure that the reason for this problem is that I cannot get the
TOFILE( ) parameter right. I tried QSYSPRT, but that did not help. The
name of the program-described printer is REPORT, but I can't use that.
Does anyone know (or even be willing to hazard am educated guess) what
TOFILE( ) value would work for a program-described RPG II printer file?
Jerry C. Adams
IBM System i Programmer/Analyst
This email is intended only for the person or entity
to which it is addressed and may contain information
that is privileged, confidential or otherwise protected
from disclosure. If you are not the named addressee
or an employee or agent responsible for delivering
this message to the named addressee, you are not
authorized to read, print, retain copy, and disseminate
this message or any part of it. If you have received this
message in error please notify us immediately by email,
discard any paper copies and delete all electronic files
of this message.