ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

ISeries spool without overflow

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

  • ISeries spool without overflow

    Hi everybody.
    Anybody knows how to create a spool file of one page only and a number of lines exceeding the classic limit of 255 ?
    Thank You !!!

    Alberto

  • #2
    Re: ISeries spool without overflow

    If you reduce the font size to human unreadable you may be able to do this...
    The whole reason that page 2 and all of those pages that follow is to allow
    for readability. What is your reason for wanting to keep everything on 1 page?

    Thank you
    Jamie
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: ISeries spool without overflow

      Ciao Jamie and many thanks for your reply.
      I know that my post is quit strange....,
      in fact i don't have to print the spool.
      The only reason because i need a spoolfile with no overflow
      is that I have a web application (that unfortunately i can't modify)
      that read the spool file and generates an xls spreadsheet
      like the one you can see in the attachment
      (the printer file i'm using has a pagesize = 255).
      So i have thought that if i succeeded to create a spoolfile with one page,
      probably ths XLS should be correct...

      Thank You !
      Alberto
      Attached Files

      Comment


      • #4
        Re: ISeries spool without overflow

        Ciao back....

        I think you are stuck... you know you can generate perfectly good XML directly from the IFS.
        I would look at this as it is a more complete solution.

        Please let us know if you decided to do this, we will help.


        Whats the weather like today?
        Post a picture if you have one... I love Italy!


        Take care
        Jamie
        All my answers were extracted from the "Big Dummy's Guide to the As400"
        and I take no responsibility for any of them.

        www.code400.com

        Comment


        • #5
          Re: ISeries spool without overflow

          Many thanks for your replies Jamie !
          The reason because i'm trying to solve my problem in this way
          is that everything works now except for that page jump !
          (and i'm a little stubborn too).

          In any case I've already (in my mind) a couple of thousand solutions
          but this means write new code, go out from our standard (we have a standard ???)
          and so on...

          The weather today ?
          I live in Brescia (250000 people, 80km from Milano) and
          if i look to my right is raining but
          if i look to my left is snowing... (strange but true).
          But springtime is very near....

          Thank You again.
          Alberto

          Comment


          • #6
            Re: ISeries spool without overflow

            Hi Alberto:

            Can you share your f-spec and o-spec?
            I don't want anything that is confidential.....Pseudo code is ok

            Thanks
            GLS
            The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

            Comment


            • #7
              Re: ISeries spool without overflow

              Ciao GLS400 and thank you for your interest.

              In attachment you can find the entire code.
              This little stupid program,
              - read a DB file XL_REPF01
              - arrange a stream wstringa
              - print the stream

              The result is a spool file, "|" separated, such this

              ....
              . . . . . . . 410111301|sconti aggiuntivi vendite italia|21131,11|9,00|21122,11|
              . . . . . . 4101113|SCONTI AGGIUNTIVI VENDITE|21131,11|9,00|21122,11|
              . . . . . . . 410111501|vendite mat prime semilavorati|0,00|31812,64|-31812,64|
              . . . . . . . 410111502|vendite scarti e rottami|0,00|71,53|-71,53|
              ....

              I'm using QSYSPRT printer file in this way

              OVRPRTF FILE(QSYSPRT) TOFILE(('FREP' *CAT &NOMREP)) +
              PAGESIZE(255 300) OVRFLW(254) OUTQ(XLS) +
              SPLFNAME('FREP' *CAT &NOMREP)

              I dont' know why IBM didn't provide a command like this...

              OVRPRTF FILE(QSYSPRT) TOFILE(('FREP' *CAT &NOMREP)) +
              PAGESIZE(*NOMAX 300) OVRFLW(*NONE) OUTQ(XLS) +
              SPLFNAME('FREP' *CAT &NOMREP)

              .... better, i can imagine why IBM didn't but my little problem remains.

              Thank You very much.
              Alberto
              Attached Files

              Comment


              • #8
                Re: ISeries spool without overflow

                Hi Alberto:

                doesn't this code:
                Code:
                C   OF              except    testa2
                O          e            testa2      1     1
                O                       wtestata
                insert a blank line at every overflow?
                (space 1 before and 1 after?)

                Best of Luck
                GLS
                Last edited by GLS400; March 18, 2013, 12:47 PM.
                The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

                Comment


                • #9
                  Re: ISeries spool without overflow

                  Your web app is reading the spool file so your stuck with the limits of the spool file. The 255 limit is set in stone you cant get past that. Either write the data to a file and do a CPYTOIMPF or use something like POI/HSSF to create the spreadsheet.

                  Comment


                  • #10
                    Re: ISeries spool without overflow

                    Ciao GLS400 and thank you for your reply.

                    I've already applied many changes to the code
                    and the answer's always been the same:
                    the problem is in the printer file (pagerange & overflow).

                    Alberto

                    Comment


                    • #11
                      Re: ISeries spool without overflow

                      Ciao DAG0000 and thank You for your reply.

                      Unfortunately I think you are absolutely right when you talk about the 255 limit..
                      .. I was hoping to find a solution in order to use the software infrastructure already existing
                      (the famous web app)... but probably the best way to solve this problem is to rewrite the application,
                      using HSSFCGI (very useful library) ... or not ?

                      Thanks a lot DAG0000 !

                      Comment

                      Working...
                      X