Overflow in RPG

130 pts.
Tags:
RPG
RPG overflow
How will u specify overflow in RPG program without indicators?

Answer Wiki

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

Printer overflow?
I think that we’re a long way from eliminating indicators in printer/screen controls.

Either using a boolean or an indicator can be used to determine if overflow has occurred.
The Keyword OFLIND is used to identify the Overflow indicator which can be a boolean as
in the example below where PrintOF is used or for internal printer files *INOF can be used.
For external printer files a numbered indicator can be used.

Alternately the file information data structure of the printer file contains the overflow line# and
the current line#.(positions 188-189 and 367-368 type boolean.

</pre>
FQPRINT o f 132 PRINTER OFLIND(PrintOF)
D PrintOF S n
C exsr overflow
C eval *inlr = *on
C return

C overflow begsr
C If PrintOF
C Eval PrintOF = *off
C except heads
C endif
C endsr

o
OQPRINT E HEADS 2

Discuss This Question: 7  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
  • Vatchy
    I eliminated the overflow indicator long ago. Keep track of the number of lines you have printed and compare them to the overflow line number in the printer file. Pretty simple.
    1,410 pointsBadges:
    report
  • philpl1jb
    Why bother to count them when the current line is in the file information data structure?
    49,610 pointsBadges:
    report
  • WoodEngineer
    This is a technique we've used successfully - no line counting required. Just check value of CURLIN to start a new page. FQPRINT O F 132 PRINTER PRTCTL(LINE) F OFLIND(*INOF) D LINE DS D FILL 1 12 D CURLIN 13 15 0
    6,365 pointsBadges:
    report
  • philpl1jb
    Right, the PRTCAT keyword and *INOF are great but just when using Internally defined (O-Spec) printer. As the good book says: "PRINTER files can be either externally-described or program-described. Overflow indicators OA-OG and OV, fetch overflow, space/skip entries, and the PRTCTL keyword are not allowed for an externally-described PRINTER file." This doesn't say you can not use an overflow indicator for an exernal printer file - just not OA-OG. But, if you need the line number you still don't need to count because the file data structure provides the line number.
    49,610 pointsBadges:
    report
  • TomLiotta
    ...just when using Internally defined (O-Spec) printer. And after all the years externally-described files have been available, no one should be using a program-described printer file any more than they'd use a program-described display or database file. There may be isolated cases for any of them; but certainly it should be less than 1% of all uses. With such rare usage, an overflow indicator wouldn't be a terrible problem. Tom
    125,585 pointsBadges:
    report
  • Splat
    I use overflow indicators for external print files, though I've stopped using the *INOx or *INnn indicators preferring to create one named (appropriately enough) OVERFLOW.
    6,905 pointsBadges:
    report
  • Splat
    Tom, And after all the years externally-described files have been available, no one should be using a program-described printer file any more than they’d use a program-described display or database file. There may be isolated cases for any of them; but certainly it should be less than 1% of all uses. From your mouth to my application software provider's ear.
    6,905 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