|
Use a logical file name over that physical in the F-specs. Then, use EXTFILE on the F-specs qualifying the library (for both your input and output files). Also, you need to rename one of the record formats. OVRDBF not required. Here is how I use Extfile to open the same file in either of two different libraries, depending on a parameter that was passed (Corporate, an indicator): FHdchrt IF E K Disk Usropn Extfile(Hdchrt_Name) D Hdchrt_Name S 21A Inz('GLHDSDATA/HDCHRT') /free // Use CPHDSDATA for files if Corporate is *ON. If Corporate; %SUBST(Hdchrt_Name : 1 : 2) = 'CP'; Endif; // Open file. Open Hdchrt; Francis Lapeyre IS Dept. Programmer/Analyst Stewart Enterprises, Inc. E-mail: flapeyre@xxxxxxxx -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of johnking@xxxxxxx Sent: Tuesday, May 30, 2006 5:04 PM To: rpg400-l@xxxxxxxxxxxx Subject: Re: Suggestion: File to use when compile All, I recently had the occasion to copy records from one PF to another identically-named PF via RPG. Of course, the compiler complained about duplicate file names so it was necessary to rename one of the the files in the RPG source and issue an OVRDBF before the program would compile. There was a thread about this topic in Oct 2004 and the consensus was that the RPG compiler should be enhanced to allow an override to the RPG-source. See: http://archive.midrange.com/rpg400-l/200410/msg00122.html. I could not locate this feature in the V5R3 RPG manual. Does anyone know whether this has been addressed by IBM yet? Many thanks, JK -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.