× 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, Barbara:

Thanks for clarifying this point. Actually, I just clicked on your link to the IBM web page with documentation for this behavior, in your reply to Jim's original post to MIDRANGE-L .

Thanks again for that link, and for the more detailed explanation on this reply.

Regards,

Mark S. Waterbury

> Barbara Morris wrote:
"Mark S. Waterbury" wrote:
This happens if you code in RPG/400 or RPGLE like this:

       CALL   'PGM001'
versus:
       MOVEL   'PGM001'   PGMNAM   10
       CALL      PGMNAM

This second case causes RPG to generate the full dynamic call that
"resolves" to the name on each call.  Note that there is more "overhead"
for doing it this way.


Mark, the re-resolve is not necessarily done even when using a
variable.  RPG keeps track of the library and program name that each
call-variable had when the program was resolved.  To get a re-resolve,
you have to use that particular variable to call a different program,
and then you can re-resolve to your original program.

 C       MOVEL   'PGM001    ' PGMNAM   10
 C       CALL                 PGMNAM
 C**       MOVEL   'DUMMYRSLV ' PGMNAM
 C**       CALL                 PGMNAM
 C       MOVEL   'PGM001    ' PGMNAM
 C       CALL                 PGMNAM

Without the call to the different program (commented out here), whatever
PGM001 it found on the first call will continue to be used on the second
call, since the value of PGMNAM is the same as it was for the first
call.

It isn't sufficient to just change the variable and change it back.  You
have to actually make a call with the new value.

For RPG/400, the FREE opcode would cause the program to "forget" the
resolved program and re-resolve.  But ILE RPG doesn't support FREE, so
to get that particular feature of FREE, you have to use this call to
some other program (which should be a very fast-running do-nothing
program).


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.