Ignore overflow processing altogether. Just use SPACEB unconditionally on every line.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steve Richter
Sent: Thursday, December 13, 2012 2:14 PM
To: Midrange Systems Technical Discussion
Subject: how to print on every line of the page, from 1 to 66?
The following code blows up when printing on the 66th line on the page.
Overflow is set to 66.  How can I write printer code that prints on each line of the page?
( I am printing CSV formatted data, then emailing the spooled file. If the page does not have all 66 lines filled, I get gaps in the resulting spreadsheet. )
      A          R DSHPR075R
      A N51                                  SPACEB(1)
      A  51                                  SKIPB(1)
      A            LINETXT      132A  O     1
Fdshpr075  O    e             PRINTER USROPN
f                                     Infds( PrInfo )
D PrInfo          DS                  qualified
D  OfLinn               188    189b 0
D  CurLinn              367    368b 0
D  CurPagn              369    372b 0
** ---------------------- dshtest ----------------------------
ddshtest          pr                  extpgm('DSHTEST')
** ---------------------- dshtest ----------------------------
ddshtest          pi
** --------------------------- qcmdexc ------------------------
dqcmdexc          pr                  extpgm('QCMDEXC')
d cmds                         999a   const
d cmdsLx                        15p 5 const
d ix              s             10i 0
d curLinn         s             10i 0
d ofLinn          s             10i 0
 /free
      qcmdexc( 'OVRPRTF FILE(DSHPR075) PAGESIZE(66) OVRFLW(66)':
               80 ) ;
      open        dshpr075 ;
      for         ix = 1 to 66 ;
        if        ix = 1 ;
          *in51   = '1' ;
        else ;
          *in51   = '0' ;
        endif ;
        lineTxt   = 'line nbr ' + %char(ix) ;
        write     dshpr075r ;
        curLinn   = prinfo.curlinn ;
        ofLinn    = prinfo.oflinn ;
      endfor ;
      close       dshpr075 ;
 /end-free
C                   EVAL      *INLR = *ON
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at 
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.