|
To create formulas on the fly, you can try to embed an interpreter in your ILE COBOL program, e.g REXX/400 or iSeries-Python. R Bruce Hoffman <bruce.hoffman@xxxxxxxxxxxxxxxxx> Sent by: cobol400-l-bounces@xxxxxxxxxxxx 02.11.2006 20:18 Please respond to COBOL Programming on the iSeries/AS400 <cobol400-l@xxxxxxxxxxxx> To COBOL Programming on the iSeries/AS400 <cobol400-l@xxxxxxxxxxxx> cc Subject Re: [COBOL400-L] Dynamic COBOL 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 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.