× 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.



I do it like this:

First, I use a CL to do the compile - creating two labels for the file (in this 
case I'm compiling a module, but the same would apply for a program):

             PGM                                                       
                                                                       
             OVRDBF     FILE(FIPRODPI) TOFILE(*LIBL/FIPRODP)           
             OVRDBF     FILE(FIPRODPU) TOFILE(*LIBL/FIPRODP)       
    
             CRTRPGMOD  MODULE(FXUTL/FXM_I00001) SRCFILE(FXUTL/MODULES)

             DLTOVR     FILE(*ALL)                                     
                                                                       
 EXIT:       ENDPGM                                                    

Then, I have the files defined in the program (FXM_I00001) like this:

FFIPRODPI  IF   E           K DISK    
F                                       ExtFile('*LIBL/FIPRODP')  
F                                       Prefix('I_')              
F                                       Rename(FIPRODR:FIPRODRI)  
FFIPRODPU  UF A E       K DISK    
F                                       ExtFile('*LIBL/FIPRODP')  
F                                       Prefix('U_')              
F                                       Rename(FIPRODR:FIPRODRI)  

The above lets me have two labels - one for input, the other for update.

'Cheers

Jim Wiant


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On 
Behalf Of Weber, Richard
Sent: Tuesday, 22 November 2005 10:03
To: rpg400-l@xxxxxxxxxxxx
Subject: Opening the same file twice


I need some suggestions to refresh my memory.  I need to open up for input
the same externally-described file twice in an RPG program.  I wrote this
once before, but I can't locate the code now.

Thanks,

Richard L. Weber  |  Senior Systems Analyst, TOYS 'Я' US International  |
973.617.3497  |  weberr@xxxxxxxxxxx <mailto:weberr@xxxxxxxxxxx> 


This message has been sent from Foodstuffs (Auckland) Limited ("Foodstuffs").

The information contained in this message and or attachments 
is intended only for the person or entity to which it is 
addressed and may contain confidential and/or privileged 
material. Any review, retransmission, dissemination or other 
use of, or taking of any action in reliance upon, this 
information by persons or entities other than the intended 
recipient is prohibited. If you received this in error, 
please contact the sender and delete the material from any 
system and destroy any copies.

The views and opinions expressed in this message may be those
of the individual and not necessarily those of Foodstuffs, 
and are not given or endorsed by it.

Please note that this communication does not designate an 
information system for the purposes of the Electronic 
Transactions Act 2002.


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.