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



On 20-Feb-2012 10:06 , rob@xxxxxxxxx wrote:
<snip>
Difficult to beat the simplicity of inserting an OPNQRYF to perform
the necessary selection via QRYSLT, and share that query ODP with
the unchanged RPG program in that very simple scenario.
</snip>
The problem is that may be acceptable for selection only changes but
any sort, column, etc changes will require a change in your RPG
logic.

Huh? The default is FORMAT(*FILE); i.e. no "column, etc. changes", except selection. Though admittedly the KEYFLD(*FILE) is not the default, and would need to be specified, plus ensuring the desirable SRTSEQ to get proper ordering. The biggest benefit from OPNQRYF is to enable creating an ODP just as would OPEN, without the program having to know any better.

Nice compassion for the person who may be under a serious time crunch
to bang it out and may not have time to learn embedded sql for this
project. May be true, but I'd argue that if the OP could take the
time to learn it they would not see it as throw away knowledge for
this one project and would soon be using it on a host of other stuff.
And if the person has more than a year on the platform and still
hasn't learned embedded SQL they really should. I wouldn't expect a
RPG developer to not have CL experience after that length of service
either. Actually, I find myself using less CL with API's and stuff
available to RPG.

Exactly my point about the biggest benefit to avoiding the OPNQRYF would be from learning the [embedded or dynamic] SQL. I had also hoped to imply that they could insert the OPNQRYF and be done, yet for having resolved the concern so quickly and easily, then also having opened the opportunity to learn how the change could have been implemented using the SQL instead.

Regards, Chuck

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.