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



Honestly...petty bad practice to do this..

And you're adding extra work for yourself, since you'll have to find and
recompile all of the callers. Even if you have a CMS that will make this
easy/automatic and automated unit & integration tests there's more risk.
When you have to recompile and/or test manually...there's lots more work
and more risk.

Assuming your following best practices and using binder source properly...

You can easy add the new version

1. With a new name
2. With the original name (and rename the original)


Option 1, any existing program and/or future modified ones continue to use
the original call without issues. Only the code explicitly changed to the
new version uses it.

Option 2, any existing program continues to work without issue. Ideally,
if you recompile something, you'll see a compile time error as there will
be a type mismatch.

Option 1 looks like
STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE('MySrvPgm_v1')
EXPORT SYMBOL('p1')
EXPORT SYMBOL('MyCoolProc')
EXPORT SYMBOL('P3')
ENDPGMEXP

changes to
STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE('MySrvPgm_v1')
EXPORT SYMBOL('p1')
EXPORT SYMBOL('MyCoolProc')
EXPORT SYMBOL('P3')
EXPORT SYMBOL('MyCoolProc_v2')
ENDPGMEXP

Option 2 looks like
STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE('MySrvPgm_v1')
EXPORT SYMBOL('p1')
EXPORT SYMBOL('MyCoolProc')
EXPORT SYMBOL('P3')
ENDPGMEXP

changes to
STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE('MySrvPgm_v1')
EXPORT SYMBOL('p1')
EXPORT SYMBOL('MyCoolProc_deprecated')
EXPORT SYMBOL('P3')
EXPORT SYMBOL('MyCoolProc')
ENDPGMEXP

In either case, you could copy the code for the old procedure into the new
and modify it. But I prefer to have one of the procs call the other with
code added to translate between old & new. Or have both call some new
internal proc with the actual logic. This way you have the logic in only
one place.

HTH,
Charles

On Wed, Jul 24, 2024 at 7:14 AM Greg Wilburn <
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

I know I can find a list of programs that use a specific service program
(using BOUND_SRVPGM_INFO).

Is there a similar method I could use to find the same information about a
specific procedure/function in that service program?

I would like to change the output format of a specific procedure, but I've
no idea where I've used it.

TIA,
Greg
[Logo]<https://www.totalbizfulfillment.com/> Greg Wilburn
Director of IT
301.895.3792 ext. 1231
301.895.3895 direct
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx<mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>
1 Corporate Dr
Grantsville, MD 21536
www.totalbizfulfillment.com<http://www.totalbizfulfillment.com>
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-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-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.