AS/400:RLU report printing

160 pts.
Tags:
AS/400
AS/400 printing
AS/400 Reports
RLU
RLU reports
I want to print a spool file with Page format ( Page no./total number of pages) in header.

Plz share how can i get this in RLU..(ex : 1/10)

 

Answer Wiki

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

Page number is simple – check the rlu help
Total number harder – requires RPG code that computes number of pages before the first header is printed. Here is discussion.

http://itknowledgeexchange.techtarget.com/itanswers/how-to-display-page-1-of-n/

Phil

Discuss This Question: 1  Reply

 
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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    As noted, page number is simply a field that you print with the page number in it. An externally-described printerfile written by RPG can have automated page number handling. The RLU manual says that the PAGENBR attribute can be used to specify the printed location. However, that only covers the current page number. The total number of pages isn't known until all of the pages are printed. You will either have to calculate somehow the number of pages before you start printing or process the spooled file after you are finished to update every page with the total. You could use CPYSPLF to a PF and update records that have page numbers. Then CPYF TOFILE(*PRINT) to generate a new spooled file with your updated page numbers. Or you can use the Spooled File APIs to copy the spooled file into user spaces, update the page number in the spaces, and generate a new spooled file from the updated spaces. Usually, some kind of constant would be placed in the original spooled file to mark where the updates should be done. E.g., you might print "*PN<" to mark the location where a "PageNumber" can be inserted. That gives you something to search for when you process the PF or the spaces. You might create a utility program that you can for any spooled file that you want this done to. In any case, RLU is only a "Report Layout Utility". It doesn't actually do any printerfile processing. The processing is done by your programming. Tom
    125,585 pointsBadges:
    report

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following