Using a SKIPA keyword in RPG

2485 pts.
Tags:
RLU
RPG
I am new to RPG. I am designing a report and I want my report to skip page after every 3 records printing. How do I achieve this? Where should I place this keyword? Thanks in advance.

Answer Wiki

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

.

Discuss This Question: 4  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.

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
  • ToddN2000

    Not knowing your exact code, the easiest  way would be to use exception printing.You don't specify if your report has headings and then you want 3 detail lines.

    You could add 1 to a line counter after your detail line is printed.

    Check line counter, if counter > 3 the EXFMT the output spec that has the SKIPA  in the O spec.

    Then reset line counter = 0.

    You could probably do this using the program data structure as well. You could just check your current line. If  current line > max print line then EXFMT the output spec that has the SKIPA  in the O spec.

    15,605 pointsBadges:
    report
  • philpl1jb

    It's also possible to get the page count from the file information data structure. 

    Having the page count you could divide by 3 and if there is no fractional part you are on page 0/3/6/9...

    The technique for skipping lines depends on if you are using a printer file or O-Specs.

    51,235 pointsBadges:
    report
  • hunshabbir7
    thanks for reply, I had already implemented the logic but dont know why overflow indicator was not working, but now it is working just fine. I removed SKIPA keyword and placed SKIPB on top of the report (with title record), and it is working as desired. Thanks again for reply.
    2,485 pointsBadges:
    report
  • philpl1jb
    You may have discovered that you need to associate an overflow indicator to the print file in the F-spec using the OFLIND keyword.
    51,235 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