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



 This was not fun. I had multiple files and fields. I wish when I had the 
field name in the driving file I could have a way to tell it to use it's 
value. I found some other people asking on the list. I think they were 
suggesting or asking for something like this ***Note true code

 C                     CHAIN FILE with A5AN8
 C                     CHAIN FILE with ABALPH

 C               Dou     %Eof(F0005)  ***** This file contains Flatfile's 
needed fields
 C                     READ F0005 
 C                     Eval    Flatfile  = Flatfile + 
%trim(%usevalueasfield(DRDL01)) + TAB 
 C                     Enddo
 
With first record with DRDL01 containing field from other file like A5AN8 
with value of '0000006' from chain to file with A5AN8. So result would be 
Flatfile  = '0000006X'05'                       '

Wtih second record with DRDL01 containing field from other file like 
ABALPH with value of 'BILL' from chain to file with ABALPH. So result 
would be 
Flatfile  = '0000006TABBILLTABetc........       '

Thanks
Bill H.
Any thoughts, comments, or thumps on the Head excepted?!.... 

 




"Buck" <buck.calabro@xxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
07/31/2003 01:02 PM
Please respond to RPG programming on the AS400 / iSeries

 
        To:     rpg400-l@xxxxxxxxxxxx
        cc: 
        Subject:        Re: Field Names in File Field


I think I might have posted an example to the FAQ at http://faq.midrange.com
or to the archives of the Midrange RPG400-L list at http://www.midrange.com.
Search for 'indirect reference'.  Also, David Morris' excellent
iSeries-toolkit has examples of dynamic SQL http://www.iseries-toolkit.org
  --buck



_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




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.