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



I have a service programs that dynamically load service programs at run
time in my trigger mediator at www.think400.dk/downloads.htm or I could
send just the activation service programs with and example if someone wants
to look at them.

The code is simple. You just pass the service program name, library or
*LIBL and the service procedure name and you get back a procedure pointer
to the procedure in the service program. You then just call the service
program using the procedure pointer.

So you three ways of dealing with a service program.

1. *IMMED loads when the program or service program that uses it is started.
2. *DEFER does not load the service program until the program or service
program invokes it but you must know the name of the service program at
compile time.
3. You can use the API's and load a service program dynamically. This is
for when you do not know what service program you want to execute until run
time.

On Thu, Dec 22, 2011 at 4:21 PM, Scott Klement
<midrange-l@xxxxxxxxxxxxxxxx>wrote:

Do you mean this thing?

CRTPGM PGM(FOO) BNDSRVPGM((*LIBL/BAR *DEFER))

Honestly, I haven't played around with that option, so I don't know if
it checks for the *SRVPGM existence when the *PGM is activated? But I
know (from the docs) that when you specify *DEFER, the *SRVPGM isn't
activated until it's used. So maybe it's not resolved until then, either?

At any rate, instead of using traditional ILE binding, you can always
use APIs to resolve/activate/call the srvpgm manually. Then you can
choose when you resolve/activate/call, since it's all done in your code.

I'm not recommending that, mind you. I'm just telling you that it's
possible.


On 12/22/2011 5:01 PM, James Lampert wrote:
Given a program that, depending on circumstances, may or may not call
anything in a given service program to which it is linked, is it
possible to defer checking for the existence of the service program
until a call is made to it?

I'd RTFM, but I'm not entirely sure which FM to R.

--
JHHL

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-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.