× 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: RPG how to use the same printer file twice?
  • From: Alan Campin <Alan.Campin@xxxxxxxxxxxxx>
  • Date: Tue, 5 Oct 1999 18:38:54 -0600

Chris wrote:

>>But you must have both objects to compile so the compiler can read
>>the record formats.

The solution to this is to issue an override from PACK to PICK before you
compile and program will compile. Only trick is that you are going to end up
with the same record format name twice so you are going to have to rename
the record format. This is an example of how I did this with two print
files.

 OVRPRTF FILE(IV0035_P02) TOFILE(IV0035_P01)

 fIV0035_P01o    e             printer infds(zsfip1)       
 f                                     oflind(*in71)       
 f                                     usropn              
 fIV0035_P02o    e             printer oflind(*in72)            
 f                                     usropn                   
 f                                     rename(rp01a:rp02a)      
 f                                     rename(rp01b:rp02b)      
 f                                     rename(rp01c:rp02c)      
 f                                     rename(rp01d:rp02d)      
 f                                     rename(rp01e:rp02e)      
 f                                     rename(rp01f:rp02f)      
 f                                     rename(rp01g:rp02g)      
 f                                     rename(rp01h:rp02h)      
 f                                     rename(rp01i:rp02i)      
 f                                     rename(rp01j:rp02j)      

I have one big advantage in doing this. I have a utility that allows me to
store all the commands for how to create an object in the header of object
and the ability to read them at compile time. Example:

 *_> CNLLSTSPLF SRCFILE(@2/@1) SRCMBR(@3)                              
 *_> DLTMOD MODULE(@5/@4)                                              
 *_> OVRPRTF FILE(IV0035_P02) TOFILE(IV0035_P01)                       
 *_> CRTSQLRPGI OBJ(@5/@4) SRCFILE(@2/@1) SRCMBR(@3) +                 
 *_>    COMMIT(*NONE) OBJTYPE(*MODULE) +                               
 *_>    CLOSQLCSR(*ENDACTGRP) DBGVIEW(*SOURCE)                         

So every time the source is compiled, these commands runs and one of them
sets up the override. Otherwise, I have to compile interactively. 

-----Original Message-----
From: Chris Bipes [mailto:ChrisB@cross-check.com]
Sent: Tuesday, October 05, 1999 4:26 PM
To: 'MIDRANGE-L@midrange.com'
Subject: RE: RPG how to use the same printer file twice?


Yea and No.  Once the programs is created, you can override printer file
Pick to printer file Pack and the same file definition would be used for
both.  But you must have both objects to compile so the compiler can read
the record formats.  But you only need one source file, though you must copy
Pick to Pack after compiling Pick from source and before compiling the RPG.

Christopher K. Bipes    mailto:ChrisB@Cross-Check.com
Sr. Programmer/Analyst  mailto:Chris_Bipes@Yahoo.com
CrossCheck, Inc.        http://www.cross-check.com
6119 State Farm Drive   Phone: 707 586-0551 x 1102
Rohnert Park CA  94928  Fax: 707 586-1884

*Note to Recruiters
I nor anyone that I know of is interested in any new and/or exciting
positions. Please do not contact me.


-----Original Message-----
From: Goodbar, Loyd (AFS-Water Valley) [mailto:LGoodbar@afs.bwauto.com]
Sent: Tuesday, October 05, 1999 1:43 PM
To: 'midrange-l@midrange.com'
Subject: RPG how to use the same printer file twice?


Is there a way to use the same printer file twice in a RPG program?

I've got a picker program that prints both a pick list and a packaging list.
It currently uses two printer files for barcode support (was originally
O-specs). Both printer files are identical except for the heading (picklist
vs packaging). It would be really nice not to maintain the same printer file
twice, or the same program twice (if you use separate programs, utilizing
the same printer file)..

Thanks!

--
Loyd Goodbar
Programmer/Analyst
Borg-Warner Automotive, AFS, Water Valley

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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 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.