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



Jon,

if I read this is correct ...

The RPG OA handler approach is like a simple file server for
traditional RPGLE opcodes, but not for processing RPGLE Native
SQL.

It could as well be done like this ....

eval FILE = 'MYTABLE'
eval OPCD = 'CHAIN'
call 'MYHANDLER'
parm FILE // file
parm OPCD // operationcode
parm RTCD // returncode
parm BUFFER // datainterface
if OPCD = '*OK'
*** do something
else
*** do something else
endif

The handler (MYHANDLER program) can of course be anything from a
good old ICF program or program that runs native and connects to a
S/36 PF doing a flat file I spec translation to a DS or be a new
program that connects to a webservice or whatever.

The only difference is that you now has to specify the handling
program as part of a SPECIAL file on the F spec's and must specify
the interface in D specs and can use native OP codes like ...

chain myhandler;
if %found;
// do something
else;
// do something else
endif;

etc.

Regards
Henrik




Jon Paris <jon.paris@xxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
22-07-2010 15:57
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
rpg400-l@xxxxxxxxxxxx
cc

Subject
Re: Open Access for RPG






Sorry Charles - I have to completely disagree with you here.

Unless you are performing set updates - not that common - most
business applications still process a retrieved set a row at a time.
Whether that be by retrieving the entire set as an array and then
walking through it, or by using a cursor, or ...

Why can the OAR handler not retrieve the set and then hand it back a
row at a time in response to read requests?

I know it will happen becuase the IBM Lab Services team already do
this with SPECIAL files as part of their database modernization
approach. OAR handlers are a natural and much simpler extension of
that process.


Jon Paris

www.Partner400.com
www.SystemiDeveloper.com



On Jul 22, 2010, at 9:30 AM, rpg400-l-request@xxxxxxxxxxxx wrote:

While you could certainly do it, I doubt it would be a good idea.

The problem is that ROA is designed for RLA and you'd probably need to
use SQL in the handler to access the remote DB. While SQL can
certainly return 1 record at a time, it wouldn't be very efficient.


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.