ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Report line number

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

  • Report line number

    I'm trying to print a statement at the bottom of the last page of a variable lenght report.
    My problem comes in when I try to z-add 51 to the line counter. It stays 51 until I write the line then it goes back to what it was. This is an old RPG program. The lines are in a table and parsed together and printed as a variable name.

    IFDS1 DS
    I 1 8 S1FNAM
    I B 123 1240S1SFNO
    I B 367 3680S1LINE
    I B 369 3720S1PAGE
    * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

    MOVE 'Y' CLAUSE 1
    MOVELFM1,1 CLSE
    MOVE FM1,2 CLSE
    Z-ADD51 S1LINE
    WRITECL

    after this write the line number goes back to 21.
    Any ideas. I can't specify the line number on the printfile because it doesn't always print at the same place. Does anyone understand my problem? If you do, help please!

  • #2
    Re: Report line number

    the datastructure is just giving you the line# you cant change it....

    you could do a loop and write blank lines between...

    like: 51 -21 = 30

    for count = 1 to 29;
    write blank
    endfor

    then write your line....
    I'm here to chew bubble gum and kick @#%@#%@#%.....and I'm all outta bubble gum !
    Yes I'm talking to you squirrel nuts.

    Comment


    • #3
      Re: Report line number

      Thank you every so much. What I ended up doing after I found that out, was to specifiy the line number with a blank field to reposition the print line. At that point I print the text. It seems to work. The trouble is working with the old stuff. Thank you so much.

      Comment


      • #4
        Re: Report line number

        Another method would be to use the "Skip Before" on the O-Specs.
        http://www.linkedin.com/in/chippermiller

        Comment


        • #5
          Re: Report line number

          Originally posted by sara View Post
          I'm trying to print a statement at the bottom of the last page of a variable lenght report.
          My problem comes in when I try to z-add 51 to the line counter. It stays 51 until I write the line then it goes back to what it was. This is an old RPG program. The lines are in a table and parsed together and printed as a variable name.

          IFDS1 DS
          I 1 8 S1FNAM
          I B 123 1240S1SFNO
          I B 367 3680S1LINE
          I B 369 3720S1PAGE
          * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

          MOVE 'Y' CLAUSE 1
          MOVELFM1,1 CLSE
          MOVE FM1,2 CLSE
          Z-ADD51 S1LINE
          WRITECL

          after this write the line number goes back to 21.
          Any ideas. I can't specify the line number on the printfile because it doesn't always print at the same place. Does anyone understand my problem? If you do, help please!
          just a shot in the dark...but is this a file information DS? if so then it's normal for the line number to revert back, since the output was to the file, the line number would be the line number referenced by the file...
          I'm not anti-social, I just don't like people -Tommy Holden

          Comment

          Working...
          X