|
>Date: Wed, 8 Dec 1999 15:01:10 -0700
>From: Alan Campin <Alan.Campin@CaseLogic.com>
>
>
>I call this little function each time before I write. I have this function
>in a copy block so only need to include copy.
> ...
Alan, this function is an ideal candidate for a service program if you
just add one more parameter:
COPY block:
d ChkPrtOvr pr like(StdChr)
d InLinesRequir 5p 0 value
d pInfds * value
----------------------------------------------------------
Sample caller:
fprt01 o 100 printer infds(infds01)
* (define the INFDS this way if you don't need it for anything else)
d Infds01 ds 368
... same code as yours until subroutine
*****************************************************************
* srCheckOvrFlow - Check Overflow
*****************************************************************
c srCheckOvrFlowbegsr
* Check Overflow
c if ChkPrtOvr(cOverflowLimit:%addr(Infds01)) =
Yes
c write rp01_06
c write rp01_07
c exsr srPrintHeader
c endif
c endsr
----------------------------------------------------------
Procedure in service program:
p ChkPrtOvr b export
d ChkPrtOvr pr like(StdChr)
d InLinesRequir 5p 0 value
d pInfds * value
d dsPrtFile ds based(pInfds)
d ssOvrFlw01 188 189i 0
d ssCurLin01 367 368i 0
*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* If line number greater than overflow set for this file.
c if (ssCurLin01 + InLinesRequir)
c > ssOvrFlw01
c return Yes
c else
c return No
c endif
p ChkPrtOvr e
Barbara Morris
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.