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



Hi Dave,

It's possible to create a spreadsheet with POI, and call the Java class that evaluates a formula. Assuming you're running V5R1 or higher, RPG can call Java methods, so your RPG program can insert a formula and get it's result, etc.

POI's documentation for formula evaluation is here:
http://poi.apache.org/spreadsheet/eval.html

(The docs examples are all Java... but it's possible to do the same thing from RPG, you just have to code your own prototypes.)

Not sure if that's helpful?

On 3/15/2012 4:19 PM, Dave wrote:
Hi all,

Today I was presented with the most complex set of mathematical
instructions in an rpg program I have ever seen. (insurance tariffs).
I was not involved in the development but as I was involved in other
tests on the product, that used these calculations, I was asked to
control the tariffs that were shown during the course of my own tests.
The user had supplied an Excel spreadsheet which we could use to enter
any test amounts to get the different details of the tariffs. So, to
test the rpg code, we are basically creating a client on a 5250 screen
and checking the displayed tariffs calculated by the rpg program with
those obtained with the spreadsheet. It doesn't seem right to me that
we have basically 2 copies of the formulas needed for the
calculations, the user's in the spreadsheet and ours in the rpg
program. The rpg code used to reproduce the excel formulae is very
complicated, and the programmer who wrote it is using the debugger to
be able to see the result of the different steps in the calculation!
How could the rpg program access directly the user's formulae? I
thought web service, but I would not really know where to start.
Thanks in advance for any suggestions.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.