RLU- How the lines will be calculated in the program

70 pts.
AS/400 debugging
RPGLE Program
I've a printer file with a 2 Header and 2 detail record format with SPACEB(002) for all of them....I moved the values to the fields of the Detail and of Header formats. When i ran the program report is generating. i like to know how the printed lines is getting accumlated. When i debug after writing the header or detail record format line counter is incremneting dindt understand how it calculates? Can any help me out to understand the concept.
Header1 got 10 headers to print. 
Detail1 got 10 records to print. same for header2 and detail2 also.

Software/Hardware used:

Answer Wiki

Thanks. We'll let you know when a new response is added.

What is there a reason you ared concered about the line counter?
Are you using Overflow for new page headings?
Is the report not printing as you are expecting?
Or are you just curious about how the PRTF works?

Discuss This Question: 6  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Kvrs80
    Yes, i'm using the overflow for new page. In the program every time before writing checking the overflow with the line counter.
    70 pointsBadges:
  • CharlieBrowne
    I do not understand this statement " like to know how the printed lines is getting accumlated." When you do a WRITE to your PRTF, the information is immediately outputed. The sequence of your WRITE statements is how your report will look. I'm missing something here. So I am having a hard time helping you.
    62,385 pointsBadges:
  • TomLiotta
    I also do not understand. The line counting is automatic and is based on the definition of the printer file that you use. That's how RPG works. But it's not clear what you actually want to know. Tom
    125,585 pointsBadges:
  • pdraebel
    Line and Page counts can be found in the File Information Data structure for the Printerfile (INFDS). This can allow you to exercise a far greater control over the creation of the printout in your program if you want.
    7,545 pointsBadges:
  • Kaisersosa
    Here's how I use what Pdraebel indicated to make sure that just before i write out 6 detail lines, there's enuff room left on the page for them - // Printer file fedi816rpf o e printer oflind(overflow) f usropn f infds(PrtFInfds) .... .... //--------------------------------------------------------------- // Printer File Feedback Information data structure //--------------------------------------------------------------- d PrtFInfds ds qualified d ODP_Type 81 82 ODP Type d FilNam 83 92 File name d LibNam 93 102 Library name d SplFilNam 103 112 Spool file name d SplFilLib 113 122 Spool file lib d SplFilNbr 123 124I 0 Spool file num d Rows 152 153I 0 # Printable Rows d Columns 154 155I 0 # Printable Cols d OFLine 188 189I 0 Overflow line d CurLinNum 367 368I 0 Current line num d CurPagNum 369 372I 0 Current page cnt .... .... // Insure theres enuff lines to write 1 records worth data // before writing out the 6 detail lines if prtfinfds.curlinnum > 52; doOverflow(); exsr @writeTradingpartnerInfo; exsr @writeTypeCodeInfo; endif; John B (might want to paste it into a text document with fixed width font)
    275 pointsBadges:
  • The Most-Watched IT Questions: March 22, 2011 - ITKE Community Blog
    [...] 1. CharlieBrowne, TomLiotta, Pdraebel, and Kaisersosa put their heads together to help a member trying to figure out how lines will be calculated in RLU. [...]
    0 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: