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



Vern,

We had an interesting (for me ) thread a good while ago when I was trying to call a program that existed in several different libraries with the same name. The program name was passed as a variable, the library list was put in place but I couldn't call a different program once I'd made the first call. Ie, after calling liba/pgm, I took off liba from the list, added libb, but it was liba/pgm and not libb/pgm that was called next time.
I learned to put the qualified name of the program in the variable to force the pointer to the program to be re-resolved.

So, now, thanks to this thread, I have a little trick to replace the program without ending the activation group. Great stuff, thanks to all.

-----Message d'origine-----
De : midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de Vern Hamberg
Envoyé : mercredi 12 janvier 2011 15:10
À : Midrange Systems Technical Discussion
Objet : Re: Program won't let go of QRPLOBJ

Nice to know, Jon - so David should ignore my reply just now!
Thunderbird threading can get weird sometimes - it's all
about timing, as they say.

Vern

On 1/12/2011 7:49 AM, Jon Paris wrote:
Yes.

The pointer setting logic I described earlier is slightly
different when a variable is used for the program name. In
that case a test is made against the stored copy of the name
and if it has changed the program is re-resolved. SO had the
xyz program existed, the technique would work if you did a
dummy call to the xyz version immediately followed by
reinstating your MyPgm and doing the real call. You would
then be connected to the "real" version.

Jon Paris

www.Partner400.com
www.SystemiDeveloper.com



On Jan 12, 2011, at 8:34 AM, midrange-l-request@xxxxxxxxxxxx wrote:

Ok I'm calling the program like this :


MYPGM = 'MyPgm';
CALL MYPGM


Program crashes and I replace 'MyPgm'. This has no effect
as the job knows it must now use the version in QRPLOBJ.

So, I debugged and did EVAL MYPGM ='xyz'
The program crashes because xyz does not exist.

I change MYPGM back to 'MyPgm' hoping the pointer to MyPgm
would be reresolved. Would this have worked if the program
xyz had existed?
--
This is the Midrange Systems Technical Discussion
(MIDRANGE-L) mailing list To post a message email:
MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change
list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting,
please take a moment to review the archives at
http://archive.midrange.com/midrange-l.


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.