Justin, how are you compiling the service program? Is it an RPGLE source
type, or is it an SQLRPGLE source type.
The latter has a parameter where you can specify the SQL path. I normally
use *LIBL everytime I use SQLRPGLE source types and that helps a lot.

Example:
Your original source is MYSRVPGM.sqlrpgle
Then I use this user-defined option in PDM, which I named "C6" to compile a
module.
CRTSQLRPGI OBJ(&L/&N) SRCFILE(&L/&F) SRCMBR(&N) COMMIT(*NONE) RDB(*LOCAL)
OBJTYPE(*MODULE) OPTION(*XREF *SYS) CLOSQLCSR(*ENDMOD) DATFMT(*ISO)
SQLPKG(*OBJLIB/*OBJ) SQLPATH(*LIBL) DBGVIEW(*SOURCE)

This user-defined PDM option will take care of substituting the
corresponding values.

a. Do you see the "OPTION(*XREF *SYS)" parameter? the "*SYS" means "use
system convention and not SQL convention".
b. Do you see the "SQLPATH(*LIBL)" parameter? This means "adhere strictly
to the library list of the job" where the job is running, but although the
*SYS already says that, I force it with this other parameter anyway.

Then I create the service program from the module.
Not sure if this is the issue, but this is the way I have been successful
with this. Now, your software that promotes has to know "how" to do this.

HTH
JS

El mié, 18 mar 2026 a las 14:10, Justin Taylor (<jtaylor.0ab@xxxxxxxxx>)
escribió:

I have an external stored procedure around a RPGLE service program. The
stored proc does not specify a library for the service program. For some
reason, source control promotes the stored proc to 2 libraries. The
service program only exists in 1 of those libraries.

The .NET caller uses System naming. The library list contains both of the
libraries where the stored proc resides. It finds and executes the stored
proc in the highest library in the *LIBL. Then it assumes the service
program is in the same library, rather than using *LIBL. Since the
service program doesn't exist in that library, it fails (the service
program is in the other library).

How can I get it to use *LIBL to resolve the service program?


Thanks
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



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