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



There is a REXX interface that will do what you want, but you will need to
set the value of the variables before calling it.
I've used a parser that I wrote back in the 1980s in RPGIII that works
fairly fast and is very clean. I created it as an expression analyzer for a
product I used to sell named "Partner" and then later "Partner400" (no
associating with Jon and Susan's "Partner400"). But of course, I don't
sell/give-it-away since it is in RPGIII.
Another option might be to dynamically generate an SQL statement and then
call the Prepare statement in embedded SQL.
-Bob Cozzi


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Charles Abbott
Sent: Tuesday, June 29, 2004 8:35 AM
To: RPG400-L@xxxxxxxxxxxx
Subject: Using a formula in a field in RPG

We are trying to mimic some old PL/1 code that uses formulas stored in a
file and are executed at run time.  We are trying to figure out how we can
execute the "value" of a formula field as an operation in RPG (assume V5).
The formula will have valid field names from the program and normalized
operation codes.  Something like "(width * length)/12" would be stored in a
field in the file and executed at run time as part of the code.  Any ideas?

Thanks,

Charles Abbott
The Persimmon Group, Inc.



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.