MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » July 2008

RE: OVRPRTF Command in OCL for RPG II Report



fixed

The problem has to be in my command processing program, because when I use this suggestion and Bill's directly in the OCL (i.e., explicit OVRPRTF commands without any preceding processing steps), the report gets routed to the appropriate printer as defined on the OVRPRTF command.

I put my command processing program under debug so
(a) I know it's being invoked, and
(b) I checked the values in its OVRPRTF parameters and looked as I would have expected.

So the faux pas is mine - somewhere, somehow.

Jerry C. Adams
IBM System i Programmer/Analyst
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of carl j novit
Sent: Thursday, July 31, 2008 2:28 PM
To: Midrange Systems Technical Discussion
Subject: Re: OVRPRTF Command in OCL for RPG II Report

See if this helps. OE150F is the program described printer file.
0 OVRPRTF FILE(OE150F) USRDFNDTA('IMGSERVER:Invoice +
0 Register; ; ; ; ;?1R?; ; ; ; ; ;AR;')
0 *
0 // LOAD OE150F
0 // FILE NAME-SYSCON,LABEL-SYSCON,DISP-SHR
0 // FILE NAME-ORDTRN,LABEL-?1R?.IVSORD
0 // FILE NAME-ORDEXC,LABEL-?1R?.ORDEXC,RETAIN-S
0 // FILE NAME-ARCUST,LABEL-CUST,DISP-SHR,STORINDX-YES
0 // FILE NAME-SLSMST,LABEL-?1R?.SLSMST,DISP-SHR
0 // FILE NAME-GLOFF,LABEL-?1R?.GLOFF,DISP-SHR
0 // FILE NAME-ITMMAS,LABEL-ITMMAS,DISP-SHR
0 // PRINTER NAME-OE150F,CPI-15,COPIES-1
0 // RUN

2 FSLSMST IC F 96 96R 3AI 1 DISK
3 FARCUST IC F 651 651R 7AI 2 DISK
4 FGLOFF IC F 256 256R04AI 2 DISK
5 FSYSCON IC F 512 512R 1AI 1 DISK
9 FITMMAS IC F 228 228R15AI 2 DISK
5 FOE150F O F 198 198 OF PRINTER
6 E DASH 167 1
E CCC 4 7


Thanks,

Carl Novit
Vice President
FRS, Inc.
843.720.7436 ext. 7708
Carln@xxxxxxxxx






Jerry Adams <Jerry@xxxxxxxxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
07/31/2008 03:17 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
"Midrange-L (midrange-l@xxxxxxxxxxxx)" <midrange-l@xxxxxxxxxxxx>
cc

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
OVRPRTF command.

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?

Thanks.

Jerry C. Adams
IBM System i Programmer/Analyst
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



Visit us @ www.gofrs.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact