Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Jan 16, 2019, at 2:41 AM, D*B <dieter.bender@xxxxxxxxxxxx> wrote:

<Jon>
And if I were mapping to a DB2 table and needed to do read next type operations that would matter to me - but I'm having trouble seeing why it matters when I'm changing the UPDATE in the RPG to and SQL update on another system. Normally doing that I'd be using some kind of handle/cursor/whatever to keep track of the connection anyway and if that is stored in the state info then I'm golden.
</Jon>

chain and insert are trivial. For update and delete it might depend, because rla is using positioned updates. the best way to keep track of the position I see, is a SQL cursor, but you can't create dynamicly cursor instances with embedded sql, so you would end up with SQL CLI or use bind by copy.

<snip>

What I have done is to have the OA handler cache the current record as part of the state info. Any subsequent I/O related to that record is retrieved from that cache. A lot of the time (as in OP's case) a handler is required for specific purposes and is best done by not trying to boil the ocean but rather designing for the task at hand. If you need to go further and create a generic handler that is a different animal and does indeed present a great many additional challenges. But it has been done by several people. Lab Services have an OA "product" that they offer as part of a service engagement that completely handles all RLA aspects and maps down to SQL. Dan Cruikshank has described the process and right now we're trying to find where IBM have hidden the source code.

Some additional remarks: First heared of OA, my idee was to have a generic OA handler translating all rla operations to SQL, with the final goal to enable existing RLA programms to use true SQL indexes. This would decouple RLA programms from the database without major changes, opening up the possibility for redesign steps of the database.

See above. IBM normally do it as part of a database modernization for exactly the reasons you describe.


Dieter
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].