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



Rather than delete a procedure, you could do something like have it log a message that it is being used with a call stack or something so you can fix it.

Then rename the procedure and rename the export. This way you don't have to force a recompile.

so you go from
STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE('MYSRVPGM sig v1')
EXPORT SYMBOL("CA9804R")
EXPORT SYMBOL("MYNEWSUBPROCEDURE")
ENDPGMEXP

to
STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE('MYSRVPGM sig v1')
EXPORT SYMBOL("XXX_CA9804R")
EXPORT SYMBOL("MYNEWSUBPROCEDURE")
ENDPGMEXP

This keeps "MYNEWSUBPROCEDURE" in the same slot.

Mark Murphy
Atlas Data Systems
mmurphy@xxxxxxxxxxxxxxx


-----Charles Wilt <charles.wilt@xxxxxxxxx> wrote: -----
To: "RPG programming on the IBM i (AS/400 and iSeries)" <rpg400-l@xxxxxxxxxxxx>
From: Charles Wilt <charles.wilt@xxxxxxxxx>
Date: 05/18/2017 03:56PM
Subject: Re: 2 calls to same program using different parameter lengths


On Thu, May 18, 2017 at 1:30 PM, Rob Berendt <rob@xxxxxxxxx> wrote:

Oh. Now that makes sense. I always added them to the end anyway.
Then you would only have to add an additional signature if you removed
one, or some such thing?


&#8203;You can't remove one without breaking every caller....if that's really
want you want to do...you'd do it like so
&#8203;
Go from
STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE('MYSRVPGM sig v1')
EXPORT SYMBOL("CA9804R")
EXPORT SYMBOL("MYNEWSUBPROCEDURE")
ENDPGMEXP

To
STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) SIGNATURE('MYSRVPGM sig v2')
EXPORT SYMBOL("MYNEWSUBPROCEDURE")
ENDPGMEXP


Note the signature change to force a level check exception. If your tried
to use a PGMLVL(*PRV) block here, instead of a level check error at run
time...you'd best case, get some funky exception.&#8203; Worst case, you'd get
no exception but invalid results back from the remaining procedures. As
programs that think they are calling CA9804R() would actually be calling
MYNEWSUBPROCEDURE().

Charles

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.