you understand correctly.

COBOL is not interpreted, it's compiled and that's basically what is
being asked for here... 

In other words, they want a formula language interpreter...

Not directly supported by the COBOL language, but I wrote this kind of
functionality years ago using PL/I and Cozzi had written one years ago
in RPG.

You could write it in COBOL... it's called a Recursive Descent Parser.

But it sounds more like they just want a small PC with BASIC on it. At
least that's closer to the functionality that's being requested here.



On Thu, 2006-11-02 at 08:02 -0600, Kelly Cookson wrote:
I have some colleagues who want to know if a COBOL program can
dynamically create formulas for computation:

"Have you ever or do you know if formulas can be created on the fly
using cobol?  We are basically wanting to let them enter a formula D=((A
+ B) +S) / 2).  And then we let the user tell us what to use for the
values they entered.  Just wanting to see if you have ever done anything
like this to see if possible."

My understanding of COBOL is that they would have to write a set of
programs that (1) generate the COBOL code with the user's formula
included, (2) compile the COBOL code into a program, and (3) call the
program passing it the parameters desired by the user.

Anybody know of a better way?

Thanks,
Kelly  



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