|
Alan, I'm a bit puzzled by your reply. COBOL does indeed have an internal and an external filename. However, the 'COBOL' example you give looks pretty close to RPG to me. :-) Let's forget COBOL for a moment because we are working with RPG. When you create bigfile and weefile, which you say in effect you've already done, you are in fact creating files that have exactly the same format as QADSPUPB. These files are now part of your database and you can use them directly in your program as externally described files, and the compiler will use exactly the same data definition as it would have done for QADSPUPB. The only minor complication is that both files have the same format name (QSYDSUPB); you therefore have to rename one of them using code similar to your example. So you would either have (RPG/III): FBIGFILE IF E DISK FWEEFILE O E DISK F QSYDSUPB KRENAMEWEEREC or (RPG/IV): fbigfile if e disk fweefile o e disk rename(qsydsupb:weerec) What's the problem? Dave Kahn Johnson & Johnson International (Ethicon) France Phone : +33 1 55 00 3180 Email : dkahn1@jnjfr.jnj.com (work) dkahn@cix.co.uk (home) -----Message d'origine----- De: alan shore [mailto:SHOREA@dime.com] Date: 09 September 1999 21:38 À: RPG400-L@midrange.com Objet: Re: RE: Duplicate file format Dave, Thanks for the reply. The method you described here is the method I'm using to test my logic, however I was hoping for a method that is available in COBOL, where you could specify file 1 as FQADSPUPB UF E K DISK then specify file 2 as FQADSPUPB UF E K DISK rename DMDSPUPB where the internal name of the file is DMDSPUPB, but it would be compiled using the format/data definition from the external file QADSPUPB. If there is no other method available, I will just use the method I'm already using. Thanks anyway +--- | 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-2025 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.