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



Hi, Doug:

This is a known design limitation of ILE. As soon as you invoke an ILE *PGM, OS/400 immediately attempts to resolve to (and activate) all other service programs and external programs that are used by the current *PGM. This also extends down the call tree -- as each *SRVPGM is activated, this also causes any *PGMs or *SRVPGMs that it references to be resolved and activated, and so on.

This has been corrected by IBM with V6R1. In V6R1, you can specify *IMMED or *DEFER on the CRTPGM or CRTSRVPGM command, to optionally defer loading/activating one, several, or *ALL bound service programs, on the BNDSRVPGM parameter of the CRTPGM and CRTSRVPGM commands.

Unfortunately, this does not help you in your current situation (supporting previous releases.)

But, all is not lost ...

You can use the QleActBndPgm API to load/activate each *SRVPGM and then call the QleGetExp API to get the addresses of any needed entry points within that *SRVPGM, at runtime. You store the result in a procedure pointer, and then call that procedure via this pointer.

This is a little more "set-up" work in your program, but it gives you a lot more flexibility.
Contact me "off-list" if you would like me to send you some sample code as attachments.

Regards,

Mark S. Waterbury

> Doug Davie wrote:
In one of my RPG *MODULEs, I am using the API dlpar_get_info from the
service program QPMLPMGT to retrieve LPAR information.
This *MODULE is bound together with 5 other *MODULEs into my *PGM.
I display the LPAR information retrieved on the screen.

QPMLPMGT became available in V5R3, yet I must still support customers
on releases prior to that.
When my customer on V5R2 attempts to run this program, they receive:
CPD0192: Service program QPMLPMGT not found.

It seems that when the program is initialized, it recognizes right off
that QPMLPMGT is not available.
Is there a way to get it to not check until I need it?
For example, I thought of something like this:


D GetLparInfo PR 10I 0 EXTPROC('dlpar_get_info')
D Receiver 344
D Format 10I 0 Value
D RcvrLen 10I 0 Value

MONITOR;
RtnValue = GetLparInfo(Receiver:Format:RcvrLen);
ON-ERROR;
RtnValue = 0;
ENDMON;

If RtnValue > 0
....

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.