× 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: RE: RE: Duplicate file format
  • From: "alan shore" <SHOREA@xxxxxxxx>
  • Date: Mon, 13 Sep 1999 08:56:20 -0400

Sorry if this caused some confusion.
You are right, the example I gave was what I would like to see in RPG.
There is no problem as such, but if this was available in RPG, creating other 
files using the same format would NOT be required, thus saving some overhead. 
The procedures I am writing may need to be used by different people at the same 
time, so to circumvent any possibility of duplicate files I am equating ALL 
files to QTEMP, therefore the external copy is not really required, but the 
internal copy is
Hence my request of one format being used more than once internally within a 
program.

>>> "Kahn, David [JNJFR]" <DKahn1@JNJFR.JNJ.com> 09/10 4:53 AM >>>
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 
+---

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