× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.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.

Note that I would have one of these functions per print file 01, 02, etc. 

I never use overflow. Always use the INFDS. Big advantage, you can group
lines together. 
For example, assuming a detail record with three lines, CpyPrtOvrF01(3)
would only print on the current page if enough room is left for to print all
three lines. 

Hope this helps.
  
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Included in program. Can be a copy block.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

  *--------------------------------------------------------------  
  * File information data structure for print file 01.             
 d dsPrtFile01     ds                                              
 d   ssOvrFlw01          188    189b 0                             
 d   ssCurLin01          367    368b 0                             

c

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Copy block.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

  /if defined (DSPECS)                                                   
                                                                         
 d ChkPrtOvrF01    pr                  like(StdChr)                      
 d  InLinesRequir                 5p 0 value                             
                                                                         
  /elseif defined(CSPECS)                                                
  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  * ChkPrtOvrF01 - Check for Print File OverFlow on Print File 01.       
  *   In        - Number of Lines Required.                              
  *   In/Out    - None                                                   
  *   Out       - None.                                                  
  *   Returns   - Yes(Y) or No(N).                                       
  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 p ChkPrtOvrF01    b                                                     
 d                 pi                  like(StdChr)                      
 d  InLinesRequir                 5p 0 value                             
                                                                         
  *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  * 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 ChkPrtOvrF01    e                                                     
                                                                         
  /endif


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Example code.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 

   c                   select                                     
   c                   when      oltxt1 <> *blanks                
   c                   eval      comment = oltxt1                 
   c                   exsr      srCheckOvrFlow                   
   c                   write     rp01_03                          
                                                                  
   c                   when      oltxt2 <> *blanks                
   c                   eval      comment = oltxt2                 
   c                   exsr      srCheckOvrFlow                   
   c                   write     rp01_03                          
                                                                  
   c                   when      oltxt3 <> *blanks                
   c                   eval      comment = oltxt3                 
   c                   exsr      srCheckOvrFlow                   
   c                   write     rp01_03                          
   c                   endsl                                      

    ***************************************************************** 
    * srCheckOvrFlow - Check Overflow                                 
    ***************************************************************** 
   c     srCheckOvrFlowbegsr                                          
                                                                      
    * Check Overflow                                                  
   c                   if        ChkPrtOvrF01(cOverflowLimit) = Yes   
   c                   write     rp01_06                              
   c                   write     rp01_07                              
   c                   exsr      srPrintHeader                        
   c                   endif                                          
                                                                      
   c                   endsr                                          

-----Original Message-----
From: grace.cruz@americas.paribas.com
[mailto:grace.cruz@americas.paribas.com]
Sent: Wednesday, December 08, 1999 1:44 PM
To: RPG400-L@midrange.com
Subject: Re: PRTF Overflow





I think you can use an INFDS on the printer file to keep track of the
current
line of the page so you don't have to count each WRITE.


Grace






Internet

From:     Rginbg@aol.com on 12/08/99 06:04 PM GMT


To:  RPG400-L

cc:

bcc: Grace CRUZ

Subject:  PRTF Overflow




Is there a way in ILE to determine if the overflow indicator should be
turned
on without having to count each WRITE.

TIA
Randy Gevedon
Programmer / Analyst
Kelly Software
rginbg@aol.com
+---
| 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
+---





----------------------------------------------------------------------------
-
This message is confidential; its contents do not constitute a 
commitment by Paribas except where provided for in a written agreement 
between you and Paribas. Any unauthorised disclosure, use or 
dissemination, either whole or partial, is prohibited. If you are not 
the intended recipient of the message, please notify the sender 
immediately. 

Ce message est confidentiel ; son contenu ne représente en aucun cas un 
engagement de la part de Paribas sous réserve de tout accord conclu par 
écrit entre vous et Paribas. Toute publication, utilisation ou 
diffusion, même partielle, doit être autorisée préalablement. Si vous 
n'êtes pas destinataire de ce message, merci d'en avertir immédiatement 
l'expéditeur.
+---
| 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
+---
+---
| 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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.