Midrange News for the IBM i Community


Posted by: renojim
Identical overrides give different results
has no ratings.
Published: 13 Sep 2011
Revised: 23 Jan 2013 - 2187 days ago
Last viewed on: 15 Jan 2019 (4879 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Identical overrides give different results Published by: renojim on 13 Sep 2011 view comments(14)

I have two OVRPRTF's in a CL, overriding two printer files that are identical but with different names to two different outq's. Originally they included overlays, but I've removed the overlays from the equation and still have the same problem.

OVRPRTF FILE(PRTF1) DEVTYPE(*AFPDS) +

    OUTQ(OUTQ1) HOLD(*YES) SHARE(*YES)

 

OVRPRTF FILE(PRTF2) DEVTYPE(*AFPDS) +

    OUTQ(OUTQ2) HOLD(*YES) SHARE(*YES)

 

I define them simply in my program:

FFILE1    O    E               PRINTER

FFILE2    O    E               PRINTER

 

and later write to them:

WRITE FILE1R;

WRITE FILE2R;

Now when I print the two spool files, I find that the printing on the second one starts about 4 or 5 lines lower than the other. This is a problem, because I want to use the same overlay for both.  The field names, line and end position numbers, in fact every aspect of the printer files are identical, except their names. I've tried making them USROPN, open the first, write to it, close it, open the second, write to it, close it, makes no difference. Can't find anything that makes any difference. Don't get it. Any ideas?

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS