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



Barbara and Hans,

If you're listening.  I got around this problem by using variables in the
EXTPGM keyword as suggested.

Basically, I put together my own little resolver procedure.  I pass it a
program name and it returns a qualified library/program name.

Works fine, but it's not particularly pretty.  Especially when I have a
dozen or so external programs being called like this.  


That being the case, it would be nice to have an options(*RERESOLVE) used
with the EXTPGM keyword that would tell the system to reresolve the external
name prior to each call.

Is this reasonable?  Should I do a DCR on it or is there some reason this
can't or shouldn't be done?


Thanks,
Charles




> -----Original Message-----
> From: Wilt, Charles 
> Sent: Tuesday, August 31, 2004 5:39 PM
> To: rpg400-l@xxxxxxxxxxxx
> Subject: HELP!! Calling EXTPGM before and after changing the library
> list ...
> 
> 
> All,
> 
> I've got an external program prototype with the EXTPGM 
> keyword.  Now, the
> way this is use is as follows:
> 
> MyExtPgm();
> System('ADDLIBLE MYOTHLIB POSITION(*FIRST)');
> MyExtPgm();
> 
> Two programs named MyExtPgm exist, one in my standard library 
> and one in the
> 'MYOTHLIB'
> 
> The reason for the two programs is that I have two versions 
> of a file, one
> in each library.
> 
> When I ran my job, the first call to MyExtPgm worked fine.  During the
> second call however, I got a level check because the file in 
> MYOTHLIB was
> opened by the standard library program instead of the 
> MYOTHLIB program.
> 
> Now I just ran into this, so I haven't got real deep.  But, 
> when I got the
> level check, I did check the current library list of the job 
> and it did have
> MYOTHLIB first.  Also, I used DSPFD and DSPPGMREF to make 
> sure that the file
> levels were what was expected for each version of the program.
> 
> At this point, it seems that my ILE RPG program resolved the 
> EXTPGM at the
> first run; thus finding the standard copy. When it was called 
> again after
> changing the library list the name wasn't re-resolved.
> 
> Is this really what is going on????  Or am I crazy???
> 
> If it is working as it is supposed to, how do I get around it?
> 
> Thanks,
> Charles
> 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.