I guess when I originally read his post I thought maybe he was confused as
to what it was doing. But upon rereading it I guess it could be he just
didn't understand why the programmer coded it that way, in light of the
discussion that was ongoing at the time.

"Not to dismiss however
that the use of SQL for INSERT may have allowed for more efficiency in a
coding task, esp. had the RLA update logic already existed."

I don't really understand what you're saying here.... Not sure what coding
efficiency you could be referring to...


Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777



CRPence <CRPbottle@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
05/27/2011 11:11 AM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
rpg400-l@xxxxxxxxxxxx
cc

Subject
Re: insert code was(Re: Embedded SQL - performance question)






On 27-May-2011 06:15 , Bryce Martin wrote:
It was basically a way of doing something like the following.... in
pseudo code....

chain (pattern1: color1:) myfile
if found
update
else
write
endif

instead he did this.....

write
if error
update
endif


That interpretation obscures the effects of the original coding,
whereby the file effectively had been declared twice in the program.
There would have been two ODPs to perform as originally written, one
Open Data Path used for insert\write, and the other ODP used for the
update. In either scenario coded above, the logic could be satisfied
with just one native\RLA OPEN for update; i.e. more efficiently than
having used both the SQL INSERT and RLA update. Not to dismiss however
that the use of SQL for INSERT may have allowed for more efficiency in a
coding task, esp. had the RLA update logic already existed.

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.