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



pepitovadecurt wrote:
To read the tables what's the best method (rapid)?
- SQL sentence
- Read manualy the tables. EX: SETLL, READE ... and doing the comparations.

I'm newbie in RPG400. My mentor, old programmer, doesn't know the SQL
and only uses the second method.

Thank you.

This question causes all kinds of arguments, but here are the facts:

There are certain classes of operations where native I/O (SETLL, CHAIN, etc.) is faster, often much faster, than SQL. This is typically single-record fetch, write and update of the kind done in normal transaction processing programs. If you have lots of users doing, for example, order entry, then native I/O outperforms SQL by a significant margin.

Other classes of operations are much faster in SQL, especially when reading, writing or updating large sets of records at one time. For example, clearing a field in all the records of a file, or doing a mass update of one file using data from another. And of course large, complex queries.

Then there is a middle ground where the two perform reasonably close to one another, and it's really up to you how you want to proceed. File maintenance, simple queries, that sort of thing, are entirely up to you. It should be noted that most SQL can be embedded easily into RPG programs. With free-form RPG, SQL and native I/O can be easily intermixed, so it's really a matter of style. Debugging embedded RPG is a little trickier, and the compiler tools are sometimes a little quirky, but in general it's a very productive environment.

Joe

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