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



Less need for this now that there are APIs to
retrieve procedure pointers form a Service program and you can also
now delay the "launch" of a service program, but it was useful as a
technique for making service routines dynamically loadable.

Jon, have you ever looked at my Trigger Mediator? I was doing this years ago
and I believe the API has been there from the beginning.

I have two service programs XVRSLV (Resolve system pointer) and XVDYNL
(Dynamically Load Service Program) that work together to dynamically load a
service program. I am using QleActBndPgm and QleGetExp to load the service
program and get the procedure pointer. There is a newer version of
QleActBndPgm that returns a long integer instead of a standard integer. Not
sure why it is needed.

I didn't come up with it. A guy at Plum Tree Lumber in Montana published an
article years before that used the technique for a Database Mediator that
dynamically loaded the proper service program for a given table. .

This code is freely available on the web if you want to look at it.


On Mon, Oct 5, 2009 at 11:42 AM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:

It was a design decision from the outset that ILE programs would not
"go away" unless they had to. The virtual memory management of the
system was so good by that time that it made sense to leave it where
it was and allow the memory management to page it out when needed.
Certainly it is more efficient - particularly in cases where the
program sets on LR. Under the ILE model LR just closes files and sets
a flag to say it needs to be reinitialized. So when the program is
called again it gets up and running much faster as it doesn't have to
be resolved - just reinitialized.

This has the interesting benefit - which I've taken advantage of a
couple of times - is that a program object can function as a "service"
program. Call it and have the mainline pass you back an array of
procedure pointers and you can call the procs any time you like until
the AG goes away. Less need for this now that there are APIs to
retrieve procedure pointers form a Service program and you can also
now delay the "launch" of a service program, but it was useful as a
technique for making service routines dynamically loadable.


Jon Paris

www.Partner400.com
www.SystemiDeveloper.com



On 5-Oct-09, at 1:00 PM, rpg400-l-request@xxxxxxxxxxxx wrote:

Indeed, as I found out to my surprise while hacking around on what I
understood from David's first message.

I wonder why it works this way. It seems to open another way for an
incorrect program to seem to work "by accident". Perhaps performance?
Concern about address space exhaustion? I know that the storage for a
main procedure is static, but I did not know that it is *that* static
<grin />.

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



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.