× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: Modifying spool Files (Was Text on report)
  • From: Peter Connell <peterc@xxxxxxxxxxxxx>
  • Date: Thu, 29 Jun 2000 09:11:30 +1200

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
+---

**********************************************************************************************************
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 thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.