|
Buck, Since the steps mentioned to duplicate a spool file begin with a CPYSPLF then obviously this does not work with AFPDS files, but this is not relevant since the idea was only to use this as an example and replace this step by populating the file with text copied from a source member. The suggestion assumes simple formatting without dynamic content such as date or page. If this is required then the same technique can be integrated into an RPG pgm that generates all the content other than the text by overriding QSYSPRT to have a shared open between the RPG and the CLP utility. The idea was to demonstrate a solution that requires very little coding without any need for compiling files, arrays and line counting for overflow. Others have suggested a user space, but since this merely serves as a container for the text, it is far simpler to read a file since there is a separate layer of complexity required just to populate the user space and another to extract the text from the user space in a formatted way. I don't see any advantage over using a file. As an additional note: True duplication of any spool file, AFPDS or whatever, can be readily achieved through the use of the spool file APIs. Now this is an excellent use of user spaces, since the entire spool file object, in all it's complexity, is merely dumped into the user space and read back out again. Cheers, Peter -----Original Message----- From: Buck Calabro [mailto:buck.calabro@aptissoftware.com] Sent: Thursday, June 22, 2000 2:21 AM To: rpg400-l@midrange.com Subject: RE: Text on report Peter Connell wrote: >1. The spool file is copied to disk via CPYSPLF >CTLCHAR(*FCFC). At this point the disk file >could in fact be altered in any way (especially >if it was a cheque run, if you catch my drift). >2. Then execute the OVRPRTF QSYSPRT >CTLCHAR(*FCFC). You can include any >other parameters of the OVRPRTF cmd if you >desire that change the attributes of the new >spool file. >3. Then execute the CPYF cmd to copy the >disk file to QSYSPRT. This produces a new >spool file which will differ only if you have >changed the content or overridden the attributes. This is a cool idea but it has problems if: a) The spooled file is AFPDS b) The spooled file has "Page xxx" in it c) The spooled file has headings or footers If you add or remove lines from the PF copy of the spooled file, you will disturb the page count/overflow. I've used this technique to add "Page xxx of yyy" functionality. Buck Calabro Aptis; Albany, NY Billing Concepts Corp., a NASDAQ Listed Company, Symbol: BILL +--- | 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 +--- ********************************************************************************************************** Privileged / Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and please notify us immediately. Please advise immediately if you or your employer does not consent to Internet e-mail for messages of this kind. Opinions and other information expressed in this message are not given or endorsed by my firm or employer unless otherwise indicated by an authorised representative independent of this message. +--- | 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.