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



Mark & Nelson,

I prefer to have a Mediator in the middle. This lets you decouple the
I/O routines from the application. That way you don't tie yourself to
a specific implementation. There are some tricks you can use to
do this with native based I/O, but SQL is much simpler. I have done
it both ways and would recommend starting with SQL as you have
and then working toward native (because it can be much faster).

With a Mediator in the middle you can defer the actual coding of
a native interface. I wrote an article about this a few years ago that

is still available online at:

http://www.mcpressonline.com/mc/.214a309b

As I said I have done this quite a few times and used various
techniques. Unfortunately, most of that work is not my property,
but I do have a pretty good base that is. If you are interested, I
would love to put out a base as part of the iSeries-toolkit at
www.iseries-toolkit.org and collaborate on this in a free and open
source version.

I have taken this to the level where edits can be attached to
fields at any time and native file I/O can be used like SQL.
This is hard to explain, but a database I/O wrapper wraps
access and provides trigger support. That way all access
including things like DBU and SQL get this Mediated support.
RPG is not the best language for this, but it does work. I used
a cache to support the dynamic calls that are required, which
really helps to reduce the overhead of this type of I/O server.
The biggest problem with RPG is the limited multi-threading
awareness.

David Morris


>>> MWalter@hanoverwire.com 04/10/02 10:36AM >>>

Nelson,

I just yesterday got an I/O service program to work that way. I define
an
externally descibed MODS in the calling program that is based on a
pointer.
Then the subprocedure in the service program also defines an
externally
descibed mods that is based on a pointer. I issue a select count(*)
into
:count and allocate the memory for the MODS based on the count. Then I
fetch the records into the MODS and return the pointer as well as the
record count. I'll gladly send you the source for my little test
program
privately if you wish.


Mark


Mark Walter
Sr. Programmer/Analyst
Hanover Wire Cloth a div of CCX, Inc.
mwalter@hanoverwire.com
http://www.hanoverwire.com
717.637.3795 Ext.3040


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.