× 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: externally defined data structure + renamed fields =
  • From: Jim Langston <jlangston@xxxxxxxxxxxxxxxx>
  • Date: Fri, 23 Mar 2001 08:16:27 -0800
  • Organization: Pacer International

confusion!!!!!
References: <1D87AB624C6DD411B7A600D0B78EC5F9115390@EMAIL>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-rpg400-l@midrange.com
Precedence: bulk
Reply-To: RPG400-L@midrange.com
X-List-Name: RPG/400 Discussion Mailing List (RPG400-L@midrange.com)

Hmm..

This is allowed to be entered in the editor, but I didn't' try to compile
it.

FSomeFile  IF   E             DISK    Prefix(F1_)
FAnotherOneIF   E             DISK    Prefix(F2_)

D ExtStr        E DS                  ExtName(ExtDDS) Prefix(F1_)

Instead of renaming your field in the program, use the Prefix keyword,
which adds those characters to the beginning of each field.  So now you
will have a F1_F0001 and a F2_F0002.  The Prefix on the External Declaration
also gives the variables the same name, so now you shouldn't have a problem.

Of course, now inside your program you are going to have to add the
prefix to all of your variable names you use.

Regards,

Jim Langston


"Prowak, Dave" wrote:
 >
 > Hi,
 >
 > Here's a "simple" example to depict my quandary:
 >    File1 contains a field named F0001.
 >    File2 also contains a field named F0001.
 >
 > With an I-spec I redefine F0001 to C0001.
 >
 > I have an externally described data structure that
 > refers to File2.  The problem is that the field within the
 > externally described data structure that refers to F0001 needs
 > to refer to C0001 instead (since C0001 is the field in File2, while
 > F0001 still refers to the field within File1).
 > D Some_DS     E  DS                  ExtName(File2)
 >
 > I can't use the ExtFld keyword within the externally described
 > data structure because C0001 is not externally described.
 >
 > So, how do I get the externally described data structure
 > to refer to the redefined fields within File2?
 >
 > Thanks,
 > Dave
 >
 >
 >
 >
 > +---
 > | 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.