|
pepitovadecurt wrote:comparations.
To read the tables what's the best method (rapid)?
- SQL sentence
- Read manualy the tables. EX: SETLL, READE ... and doing the
listThis question causes all kinds of arguments, but here are the facts:
I'm newbie in RPG400. My mentor, old programmer, doesn't know the SQL
and only uses the second method.
Thank you.
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
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
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.