× 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: add file with same name from different AS/400 into pgm
  • From: Rob Berendt <rob@xxxxxxxxx>
  • Date: Thu, 27 Jan 2000 12:42:57 -0500

Incorrect.  Remember, the RENAME is part of the F spec so therefore it know 
what file it is working on.




StoneJ@GourmetAward.com on 01/27/2000 12:28:47 PM
Please respond to RPG400-L@midrange.com@Internet
To:     RPG400-L@midrange.com@Internet
cc:      
Fax to: 
Subject:        RE: add file with same name from different AS/400 into pgm

Thanks for the idea, but Im pretty sure the RENAME fails because there are
two files with the same format, and RPG cant figure out which one to rename.

Is this correct?

Any other ideas?

-----Original Message-----
From: Hartman Richard [mailto:richard.hartman@brctsg.com]
Sent: Wednesday, January 26, 2000 7:06 PM
To: 'RPG400-L@midrange.com'
Subject: RE: add file with same name from different AS/400 into pgm


You can try renaming the record format of the file in the file definition
section of the program. You add    RENAME(formatname:formatname2) in the key
words section.  
This is what we do when we use two logical files in our program, that are
based off of the same file.
 I do not know if this works for physical files or not?

Then if you had the same field names in both files you could add a prefix to
the fields on one of the file specs by doing:
PREFIX(xx)

I don't know if this will work for your problem. But it is the best I can
offer at the time.
Richard

> -----Original Message-----
> From: Stone, Joel [SMTP:StoneJ@GourmetAward.com]
> Sent: Wednesday, January 26, 2000 4:29 PM
> To:   'RPG400-L@midrange.com'
> Subject:      RPG: add file with same name from different AS/400 into pgm
> 
> I need to add an order file to a inquiry RPG pgm.  The file has the same
> name as a file already in the pgm.  What is an easy way to accomplish
> this???
> 
> Only one of the files must be open at any point in time, but a user could
> look at one file and then the other in the same session.
> 
> Call qcmdexc to ovrdbf and re-open the file with each read to the orders? 
> 
> Note: I dont think I can use an LF to combine the files, because the
> second file is on another box using DDM, which is sometimes down.  If the
> DDM file is down, I still want the user to be able to see his local
> orders!
> 
> Thanks! 
> 
+---
| 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
+---


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2448.0">
<TITLE>RE: add file with same name from different AS/400 into pgm</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Thanks for the idea, but Im pretty sure the RENAME fails 
because there are two files with the same format, and RPG cant figure out which 
one to rename.</FONT></P>

<P><FONT SIZE=2>Is this correct?</FONT>
</P>

<P><FONT SIZE=2>Any other ideas?</FONT>
</P>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Hartman Richard [<A 
HREF="mailto:richard.hartman@brctsg.com">mailto:richard.hartman@brctsg.com</A>]</FONT>>
<BR><FONT SIZE=2>Sent: Wednesday, January 26, 2000 7:06 PM</FONT>
<BR><FONT SIZE=2>To: 'RPG400-L@midrange.com'</FONT>
<BR><FONT SIZE=2>Subject: RE: add file with same name from different AS/400 
into pgm</FONT>
</P>
<BR>

<P><FONT SIZE=2>You can try renaming the record format of the file in the file 
definition</FONT>
<BR><FONT SIZE=2>section of the program. You add&nbsp;&nbsp;&nbsp; 
RENAME(formatname:formatname2) in the key</FONT>
<BR><FONT SIZE=2>words section.&nbsp; </FONT>
<BR><FONT SIZE=2>This is what we do when we use two logical files in our 
program, that are</FONT>
<BR><FONT SIZE=2>based off of the same file.</FONT>
<BR><FONT SIZE=2>&nbsp;I do not know if this works for physical files or 
not?</FONT>
</P>

<P><FONT SIZE=2>Then if you had the same field names in both files you could 
add a prefix to</FONT>
<BR><FONT SIZE=2>the fields on one of the file specs by doing:</FONT>
<BR><FONT SIZE=2>PREFIX(xx)</FONT>
</P>

<P><FONT SIZE=2>I don't know if this will work for your problem. But it is the 
best I can</FONT>
<BR><FONT SIZE=2>offer at the time.</FONT>
<BR><FONT SIZE=2>Richard</FONT>
</P>

<P><FONT SIZE=2>&gt; -----Original Message-----</FONT>
<BR><FONT SIZE=2>&gt; From: Stone, Joel [SMTP:StoneJ@GourmetAward.com]</FONT>
<BR><FONT SIZE=2>&gt; Sent: Wednesday, January 26, 2000 4:29 PM</FONT>
<BR><FONT SIZE=2>&gt; To:&nbsp;&nbsp; 'RPG400-L@midrange.com'</FONT>
<BR><FONT SIZE=2>&gt; Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RPG: add file with 
same name from different AS/400 into pgm</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; I need to add an order file to a inquiry RPG pgm.&nbsp; 
The file has the same</FONT>
<BR><FONT SIZE=2>&gt; name as a file already in the pgm.&nbsp; What is an easy 
way to accomplish</FONT>
<BR><FONT SIZE=2>&gt; this???</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Only one of the files must be open at any point in time, 
but a user could</FONT>
<BR><FONT SIZE=2>&gt; look at one file and then the other in the same 
session.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Call qcmdexc to ovrdbf and re-open the file with each 
read to the orders? </FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Note: I dont think I can use an LF to combine the files, 
because the</FONT>
<BR><FONT SIZE=2>&gt; second file is on another box using DDM, which is 
sometimes down.&nbsp; If the</FONT>
<BR><FONT SIZE=2>&gt; DDM file is down, I still want the user to be able to see 
his local</FONT>
<BR><FONT SIZE=2>&gt; orders!</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Thanks! </FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>+---</FONT>
<BR><FONT SIZE=2>| This is the RPG/400 Mailing List!</FONT>
<BR><FONT SIZE=2>| To submit a new message, send your mail to 
RPG400-L@midrange.com.</FONT>
<BR><FONT SIZE=2>| To subscribe to this list send email to 
RPG400-L-SUB@midrange.com.</FONT>
<BR><FONT SIZE=2>| To unsubscribe from this list send email to 
RPG400-L-UNSUB@midrange.com.</FONT>
<BR><FONT SIZE=2>| Questions should be directed to the list owner/operator: 
david@midrange.com</FONT>
<BR><FONT SIZE=2>+---</FONT>
</P>

</BODY>
</HTML>

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.