ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Overflow of the page is not happening in free form rpgle. Can anyone please help?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Overflow of the page is not happening in free form rpgle. Can anyone please help?

    I have declared an external printer file with overflow indicator *in10. I'm using the below code for overflow.

    If *in10=*on;
    Write Detailhead;
    *In10=*off;
    Endif;

    This piece of code is in a Dow loop and the report is printing 3257 pages.

    Any idea why it's not working?


    Thanks,
    Remya

  • #2
    It looks like it is backward.

    Maybe it should be:

    If *in10=*off;
    Write Detailhead;
    *In10=*on;
    Endif;

    but when the Dow loop ends and another heading needs to be printed *in10=*off; would have to be outside the Dow loop.

    James

    Comment


    • remyakesavan
      remyakesavan commented
      Editing a comment
      Then it will print the heading Everytime.

  • #3
    FQPRINT O F 132 PRINTER OFLIND(*INOF)

    IF *INOF = *ON
    EXCEPT HED
    EVAL *INOF = *off
    ENDIF
    prints heading one time until OF indicator assigned to QPRINT is set on again. If overflow indicator cannot be assigned
    to the printer then the program has to determine the number of lines printed until heading is needed again.

    James
    Last edited by jmartin; September 26, 2016, 08:28 AM.

    Comment


    • #4
      Originally posted by remyakesavan View Post
      If *in10=*on;
      Write Detailhead;
      *In10=*off;
      Endif;

      This piece of code is in a Dow loop and the report is printing 3257 pages.

      Any idea why it's not working?
      Your code looks good. Are you certain that nothing else inside that loop sets on indicator 10? Just because you assigned it as the overflow indicator doesn't mean that 10 can't be turned on or off elsewhere. This is one reason I declare my own indicators instead of using the predefined ones.

      Code:
      Fqsysprt   o    f  132        printer oflind(Overflow)
      
      D Overflow        s               n

      Comment


      • remyakesavan
        remyakesavan commented
        Editing a comment
        I'm using external described printer file. I even tried to declare indicator like above you described. But result is same. I'm wondering if anything special need for free format RPG.

    • #5
      I'm wondering if anything special need for free format RPG.
      I can answer that.

      No.

      Comment


      • #6
        Is the indicator *IN10 only used for overflow or may be for something else, too?
        So it is swichted off after having written the header, but whatever else moves it on for any reason?

        Birgitta

        Comment


        • remyakesavan
          remyakesavan commented
          Editing a comment
          In my case, no indicator is working. Whether it's 10 or anything else.

      • #7
        Is there some reason you're not using the "traditional" print overflow indicators like *INOF, *INOA, etc. in your QPRINTF file spec? I mean, that's what those are for, right?

        It's like OFLIND(*INOF) on the F-Spec...


        Best Regards,

        Fred Williams

        Comment


        • #8
          Originally posted by Whitecat27 View Post
          Is there some reason you're not using the "traditional" print overflow indicators like *INOF, *INOA, etc. in your QPRINTF file spec? I mean, that's what those are for, right? It's like OFLIND(*INOF) on the F-Spec...
          Hmm.. I thought we could only use the old "Ox" indicators with program-described files? Did they change that? I can't imagine giving up fonts, graphics, barcodes, etc, just to use *INOF instead of *IN10!!

          Having said that.. I would use a NAMED indicator (like "Overflow" in Ted's example) rather than *INOF or *IN10... just nicer on the eyes.

          Comment


          • #9
            How is *IN10 associated with overflow for the file? That is, can you show us the complete F-spec?
            Tom

            There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

            Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

            Comment


            • #10
              Hi Tom,


              Here is the complete F-Spec:

              FFAMONGL O E PRINTER OFLIND(Overflow)

              Previously it was
              FFAMONGL O E PRINTER OFLIND(*IN11)

              None of the indicators are working in this case.


              Thanks,
              Remya

              Comment

              Working...
              X