|
Brian, 1) Use %found instead of %eof. 2) Your loop is broken. The %found test on the DoW will be tested before the subfile has ever been read. You can either fix it by using DoU and then inserting an If %found statement right after the chain in the loop or by performing a chain just before the DoW loop and moving the chain inside the loop to the bottom of the loop. Your code would look like: Write Heading; Rrn=1; Chain Rrn Kdsdata; DoW %Found( Kdsdata ); If Prtoverflow; Write Heading; Prtoverflow = *Off; Endif; Write detail; Rrn = Rrn + 1; Chain Rrn Kdsdata; EndDo; Write Footer; or: Write Heading Rrn=1; DoU %Found( Kdsdata ); Chain Rrn Kdsdata; If %found( Kdsdatafilename ); If Prtoverflow; Write heading; Prtoverflow = *Off; Endif; Write detail; Rrn = Rrn + 1; EndIf; EndDo; Write Footer; Paul
As an Amazon Associate we earn from qualifying purchases.
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.