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



On Saturday 12 June 2004 18:22, afvaiv wrote:
[snip]
> So, let me present again my original question:
>
> If, in a RPG pgm, I manage to have in a field (let's call it FieldName)
> the name of a real field from an externally described file, and in
> another field, call it "FieldValue", a value (either alfa or numeric),
> is there a way to write something as:
> Eval FieldName(??) = FieldValue

Antonio

Have a look at the code behind CRTCSVDTA, one of my open source utilities. 
That dynamically processes fields from a file by reading from a program 
described file and extracting data from the record based on info from the 
list fields API. It should be do-able to reverse the process and write to 
a file using arrays to hold the field names and values. The RPGLE code 
can be seen here:
http://dbg400.homeip.net/cgi-bin/viewcvs.cgi/dbg400/QRPGLESRC/DBG201R4.rpgle?view=markup
and the whole utility from http://www.dbg400.net/crtcsv.html

Whether it's any quicker or not is debateable, but I think it is feasible.

Regards, Martin
-- 
martin@xxxxxxxxxx  AIM/Gaim: DBG400dotNet  http://www.dbg400.net   /"\
DBG/400 - AS/400 & iSeries Open Source/Free Software utilities     \ /
Debian GNU/Linux | ASCII Ribbon Campaign against HTML mail & news   X
                                                                   / \

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.