Page number in iSeries Printer File

250 pts.
AS/400 printing
How Could i get the Page Number in Printer File i already define the key word PAGNBR in PRTF but when i have to write that Record Format which Contain PAGNBR field ? actually i define it @ header Record format and i write header @ first time it shows me page No1 but how could i know that next page is printing and for next page number i hav to write that Header?

Software/Hardware used:

Answer Wiki

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

Every time you write the format that contains PAGENBR, it will autmatically increment by 1.

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.
  • philpl1jb
    yes - your program should detect that the page is full and write the header that will -skip to the top of the next page- -print page number -print other report heading stuff -print column headings Phil
    54,090 pointsBadges:
  • TomLiotta
    For a printer file, the I/O feedback area shows "Current page count" at offset 2 as a 4-byte integer. For most uses, it can be extracted from positions 369-372 of an INFDS() of a printer file in RPG. But people rarely need to know what page number is currently being generated. Tom
    125,585 pointsBadges:
  • Nikrajpapa
    ok thanx a lot sir,,, you r correct sir its automatically increment the Page No and write that Record Format associated with that page no. but in Spooled file its Shows me Error that Overprinting not displayed and it doesn't shows me the Further Records. i also use the OFLIND keyword in F Spec of Printer file in my Program.
    250 pointsBadges:
  • philpl1jb
    its Shows me Error that Overprinting not displayed You have multiple rows printing onto of each other. If a record contains multiple rows, the keyword SPACEB(1) - should be used on the first field of the next row (space 1 line before printing) If multiple records are used then only the first record should use the SKIPB field .. SKIPB 5 woud skip to line 5 before printing. Other records should use the spaceb or spacea to fields to advance the specified number of lines before or after printing the record. Phil
    54,090 pointsBadges:
    I like using the printer INFDS to see what print file line number is printed. If I know my total will not fit on the page I can set on overflow and print my heading before I run off the page. Good Luck!
    1,235 pointsBadges:
  • The Most-Watched IT Questions: October 11, 2011 - ITKE Community Blog
    [...] 4. CharlieBrowne, Philpl1jb, TomLiotta, and PGMBOB help a member with page numbers in an iSeries printer file. [...]
    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: