|
I guess I'm not understanding. I don't see why you have to pass the number of pages. See if I've got the scenario correct. You spool a 3 page report so that you have Page 1 of ~~~~ . . . Page 2 of ~~~~ . . . Page 3 of ~~~~ You then use the utility to get the total number of pages - now, TotPages = 3 You then have a program that scans for ~~~~ and replaces it with TotPages Here's some pseudocode... Do While NbrPagesReplaced < TotPages Scan and replace Add 1 to NbrPagesReplaced End Do After the third replacement, your loop ends. In other words, on page 3 you replace and your counter is equal so you quit. You don't go past the total pages. Gary Guthrie REAL Solutions Technical Support NEWS/400 Technical Editor > On Wed, 13 Sep 2000, Gary Guthrie wrote: > > > Rather than worry about the size of the user space, why not increment a > > counter each time you make a replacment (increment after the > > replacement) and compare the counter to the number of pages. When > > they're equal, you're finished. > > > > Will that be suitable? James David Rich wrote: > > I want to detect when I am at the end of the report without having to pass > the number of pages. But I guess I could use something like > GetSpoolFileAttributes() and find out how many pages there are. +--- | 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-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.