|
Hi Jared, > So far, I've only had occasion to use ILE languages and development tools > on the 400. I have a potential client who's using OPM RPG, and I'm > wondering what I can and can't do as far as calling C code is concerned. ILE stands for "Integrated Language Environment". The reason that it's called this is that it allows programs written in one language to seemlessly call routines written in another language. In other words, these languages can be integrated together. This wonderful capability makes it possible, for example, to call APIs created for the ILE C language from an ILE RPG program. Programs that use the original program model ("OPM") do not have this functionality. That's one of the things that makes ILE significant! > Basically I want to expose a C API that uses both input and output > parameters. Any info or pointers to relevant doc would be very much > appreciated. You didn't say whether you want to call APIs written for ILE C or whether it's for one of it's predecessors? The one thing that OPM programs can do is call other programs -- both ILE and OPM programs can be called. Therefore, it's possible to write an interface that you could call from an OPM application. Assuming that by "C APIs" you mean ILE C, you can write an interface in any ILE language that acts as a program and accepts parameters from an OPM legacy program. It can call the API, and return the results in the same set of parameters. Though, personally, I'd be inclined to convince your customer to join the modern world. After all, OPM RPG stopped being enhanced in, what, 1994? They don't have to convert everything at once, or even significantly change their coding style. When something comes up that requires modern functionality, run the RPG III code through CVTRPGSRC and delete the old RPG/400 copy. From that point on, only maintain the RPG IV copy. Believe me, they'll be happy that they did.
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.