|
Another way, which I have used long time ago, was creating a first page including the distribution list and the total number of pages. The print program was opening TWO printer files. First one printer file for the 1st page then the second for the report. Regards Hannes Rosner -----Ursprüngliche Nachricht----- Von: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com] im Auftrag von Gary Guthrie Gesendet am: Mittwoch, 6. September 2000 17:53 An: RPG400-L@midrange.com Betreff: Re: page n of x The CPYSPLF solution would not be my recommendation. CPYSPLF will only work for the plainest of spooled files. Because the CPYSPLF is roughly the same technique I described using APIs, I'd suggest foregoing the quick and dirty (not so robust) CPYSPLF method and just go with the APIs technique. Regarding the "simple column in the magazine" suggestion - The concept is simple, but the amount of code would be too large to publish in its entirety. For what it's worth, I have code from my articles in "The RPG Source" on the website for the newsletter that does all the API work. I suppose I could write a short article describing the problem, describing the solution, and providing the portion to do actual work - capture the spooled file, update it with total pages, and re-spool it. The question has been asked enough that perhaps that would be useful to the public. Votes for or against the article? Gary Guthrie REAL Solutions Technical Support NEWS/400 Technical Editor Don wrote: > > Simple solution in my book: > > 1. Run pass one over the data. > 2. cpysplf with *FCFC to db file > 3. read dbfile counting how many '1' in column one you find.. > 4. read step 2 splf again, this time you just mod the "PAGE 1234" area of > of the SPLF to be PAGE 1234 OF 9999. > > Gary, this should make for a simple column in your magazine, and I may do > a quickie "headsup" for AS400 Mag... > > > > +--- > | 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 +--- +--- | 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.