|
Well, I'll be hog tied! Just like C's redirection in DOS and Linux. And all this time I've been using SEU or writing a program to print files. Thanks for the info!!! Regards, Jim Langston Peter Connell wrote: > Jim, > Yes, CPYF to a printer file can be likened to passing a stream of data to be > printed to an object that will that sends the stream to a print device. You > just have to have to correct print control characters that the device > expects embedded to be embedded in the stream. Since the example uses *FCFC > in the disk file then you must override the printer file to *FCFC before the > CPYF. Of course the targeted printer file can be QSYSPRT or any other, as > long as it is program described. Be sure that the data is text only, no > packed fields. Also be aware that you can loose some data that is > non-textual if you use CPYSPLF. > > It's very easy to demonstrate. > Just CPYF any file you like to QSYSPRT without any overrides at all and you > will get a report except that there will be no line/page formatting. > > Note: We have used this technique in the past to change the orientation of > reports that use only 80 columns but the printer file has 132 and the laser > printer defaults to landscape. By including to page rotation keyword PAGRRT > in the override the report can be reoriented to portrait. Sometimes we even > take advantage and override the PRTTXT to force a footer on to a page that > never had one. > > Cheers, Peter > > -----Original Message----- > From: Jim Langston [mailto:jlangston@conexfreight.com] > Sent: Thursday, June 29, 2000 4:15 AM > To: RPG400-L@midrange.com > Subject: Re: Modifying spool Files (Was Text on report) > > Going back through my messages I re-read this message two or three times > until it finally clicked what you were saying. I don't think this would be > appropriate > to my situation, but you brought up the fact that spool files can be > modified, which > has been requested of me quite a few times (somethign new on report, "can't > we > just change the spool file?) I never knew how to do. > > I understand everything, except for the last step. > 3. Then execute the CPYF cmd to copy the disk file to QSYSPRT. > > I see QSYSPRT is a printer file located in my QSYS directory. At this point > in the > instructions, my spool file would be on my DASD as a text file (I use > CPYSPLF > a lot when transfering data to PCs so understand that). > > Are you saying that if I take a text file, and copy it to an existing > printer file, the file > will be printed out instead of copied? > > Regards, > > Jim Langston > > Peter Connell wrote: > > > Jim, > > Here is an idea, but it may not be applicable to your situation. > > It is based on the following steps that can be used to create a copy of an > > existing spool file. > > > > 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 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.