On 2/2/11 7:58 PM, jmmckee wrote:
Is there a difference between a WRKQRY with an 80 character output
line and an RPG III program with an 80 character line? The first
one, sent to a Xerox remote outq, prints portrait. The second prints
landscape.
WRKQRY uses the printer file *LIBL/QPQUPRFIL. The RPG program would
be [nearly] unable to use the same printer file. Review beyond just the
PAGESIZE() for the FONT(), CPI() and PAGRTT(), as suggested by Gary.
Note also that the Query/400 has a "feature" which, in response to a
PAGESIZE [which RUNQRY incorrectly kept as pre-GA naming: FORMSIZE()]
with "wide" output, the Query/400 run-time will open the printer file
with a specific FONT() setting; i.e. irrespective of what is defined in
the PRTF for FONT(), the open is set IIRC as though FONT(*CPI) had been
defined. The PRTF QPQUPRFIL having the default page rotation of
PAGRTT(*AUTO) combined with a default CPI(10) can not "fit" across the
page when printing in portrait, so the landscape mode will be
"automatically" chosen to effect "best fit" according to that CPI. An
override to include FONT() and\or PAGESIZE(), or a smaller CPI(), can
control that nuanced behavior.
This is an old RPG III program, used as a print service program. It
reads from a file and prints data to selected printers. Hard to test
the thing without impacting users.
Appropriate use of CHGSYSLIBL, CRTDUPOBJ, CHGPRTF, OVRPRTF, OVRDBF,
and even QRYFILE() and OUTFILE() specifications on the RUNQRY should all
help to enable testing without impacting the users.?
A second question, related to the above: Original compile time
table holding the skeleton OVRPRTF command only includes the first
parameter on PAGESIZE().
Presumably meant: The first element of the PAGESIZE parameter, such
as PAGESIZE(66) or the same as PAGESIZE(66 *N *N) having been specified?
I put a second OVRPRTF after that with PAGESIZE(66 80). No change.
The first override with the same scope takes precedence, unless
secured, or the override to FILE() was replaced entirely at the same
call level. AFaIK the precedence is at a parameter level, not to the
level of the elements of any one parameter; i.e. the first of the
following two invocations having been performed at a lower caller level
than the second, will show in DSPOVR after both invocations, as having
PAGESIZE(44):
ovrprtf x pagesize(44) ovrscope(*calllvl)
ovrprtf x pagesize(66 80) ovrscope(*calllvl)
Moved it in front of the original. Still no change.
Output is always landscape. The skeleton does not have the SECURE
parameter. Which is why I am wondering if there is a difference
between WRKQRY and RPG III.
Seems probable, for different printer files, each with specific
parameters [besides just PAGESIZE()] for which rotation is occurring for
the spooled output created by the RPG program.
Because of the nature of this old program, I was reluctant to change
the skeleton. But, I'm not clear on why the original override works,
whether it is first or second, and the added override does not appear
to work.
Obviously, I am missing something.
Unless I missed something, I think this is answered by the
"precedence" described earlier; i.e. the first override at the same
scope to the same parameter takes precedence.
Regards, Chuck
As an Amazon Associate we earn from qualifying purchases.