× 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 9/20/06, Alan Campin <Alan.Campin@xxxxxxxxxxxxxxxx> wrote:
<snip>
Actually, I'd suggest learning the appropriate places to use the
different
database tools that the iSeries gives you.  SQL is appropriate for
set-based
logic, typically queries, while single record fetches and especially
record-at-a-time updates are much better written using native I/O.

</snip>



I might agree with you Joe except for one thing and that is database
independence. Because IBM does not give us an easy way to bring in just
what we need from a table, SQL is a better solution for just about
anything because I can.



Every time we bring the entire table into a program with record I/O, we
are hard coding the physical view of the data into the program and every
program that uses that table has to be recompiled every time we add a
new field.



We can easily add new fields in DB2 now except for breaking every
program using the file in record I/O.



The other issue, for me, with using record I/O is increased complexity
in the program.



Almost invariably, when I look at I/O in a program, I find relationships
and instead of creating one SQL statement that brings in several tables
at the same time, we end up chain to one and then another and then
another and looking at values. All of this can be done in one SQL
statement and the database can do the work that end up being hard coded
into the program.



By continuing to use the record I/O model, we continue to train
ourselves to think in terms of the single file and not in terms of
database.


all true Alan. But does a 600 CPW i5 have the horsepower to run pure
SQL instead of RPG?  My guess is it does not.  Fetching thru an SQL
cursor must be slower than setll and reade. The mapping of more than a
few SELECT columns would quickly become more cpu intensive than a byte
copy into a record format.

-Steve

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.