RPG OA is simply one tool. It doesn't replace every other tool you have. Pick the most appropriate for the job. We bulit a test-case to geocode / reverse geocode an address via a simple chain. It worked beautifully. I see THAT kind of RPG OA usage as simple and elegant.
Why do you think RPG OA is the right tool here? I won't argue with your response, because I'm asking for an opinion. I just want your honest assessment of why it's better to add an OA handler in this case than say, to add a read trigger? I thought it was one of the better uses for OA - you're chaining already, but you need additional information and rather than add a procedure call in the main program you can do it in the handler.
Actually, I've sort of answered my own question, but I'm interested to hear your response.
</snip>
That was me, not Vern.
I think this situation is good for an OA handler because we may not necessarily want to (or even be allowed to) own the co-ordinate data. It may be data we need only on an ad-hoc basis. In that case, it makes sense (to me) to only get the data when it is required and let the provider (Google in this instance) manage the overhead of storing it and keeping it current. The beauty of the OA approach is that it provides a virtual table to the developer. The chain mechanism is well known to RPG developers and has expected behaviour. There is no learning curve at all for the consumer. If you can't handle a chain you shouldn't be writing RPG. The chain is designed for "random access" of data. In this case the data happens to be stored in the cloud. We could use this mechanism for many other sets of build-on-demand data. I could easily see RPG applications accessing data stored on the network via chains and read loops.
Although I endorse RPG OA in this instance I am mindful of the dangers of accessing critical data in this manner. RPG developers are not designed to worry about such things as the database not being available and may not code accordingly. Accessing data from a network resource is another matter entirely - an arena C programmers were designed for. :-)
<snip>
Oh, and OPM is not even in the picture - handlers are not even allowed
in OPM source - only ILE.
I think Larry meant "old programming model" in the sense of using RLA opcodes to call programs rather than using procedures or calls.
</snip>
That was Henrik, not me :-)
Henrik was talking about the "OPM (Old Program Model) and OPT (Old Proprietary Thinking) - very typical for IBM I programmers/companies."
I only mentioned ILE and RPG.
Cheers
Larry Ducie
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.