Thanks for the clarification. I understand now and I think it closes the
issue.

Now I need to experiment with the behaviour under CBLLE - but that's for
another forum, ay?

'Cheers

Jim

 
 
Fast is fine, but accuracy is everything. 
Earp, Wyatt


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Barbara Morris
Sent: Tuesday, 21 November 2006 9:42
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Job behaviour RPGLE vs CLLE


Jim Wiant wrote:

Thanks a lot for the clarification Barbara.

I want to be clear about FREE - are you referring to /Free (Free
Format
RPG)? If so, are you saying that if the call command is within the
free
format syntax, it will behave as I expect (i.e. resolving the library
list each call?)


Oops, sorry for the confusion.  No, I mean the FREE opcode in RPG/400:

C          CALL    'PGM001'
C          FREE    'PGM001'
C          CALL    'PGM001'

The ILE RPG behaviour is the same for free-form calls with EXTPGM too. 
You can get around it the same way, by using a variable for EXTPGM, and
using the variable name to call some other program when you want to
re-resolved to your program.

D pgm001        pr          extpgm(pgm001Var)
D   parms ...
D dummy         pr          extpgm(pgm001Var)
D pgm001Var     S      21a
 /free
       pgm001Var = 'DUMMY';
       callp (dummy);
       pgm001Var = 'PGM001';
       callp pgm001 (parms ...);
 /end-free

If you had a subprocedure that handled the first three lines, you could
code 
 /free
       resetPgm001Var ('PGM001');
       callp pgm001 (parms ...);
 /end-free

Or you could have a subprocedure that actually handled the call to
pgm001; it would have the prototypes with the EXTPGMs, and do all the
business with the call to DUMMY.  (This would work fine unless you had
optional parameters.)
 /free
        callp callPgm001 ('PGM001' : parms ...);

This message has been sent from Foodstuffs (Auckland) Limited ("Foodstuffs").

The information contained in this message and or attachments 
is intended only for the person or entity to which it is 
addressed and may contain confidential and/or privileged 
material. Any review, retransmission, dissemination or other 
use of, or taking of any action in reliance upon, this 
information by persons or entities other than the intended 
recipient is prohibited. If you received this in error, 
please contact the sender and delete the material from any 
system and destroy any copies.

The views and opinions expressed in this message may be those
of the individual and not necessarily those of Foodstuffs, 
and are not given or endorsed by it.

Please note that this communication does not designate an 
information system for the purposes of the Electronic 
Transactions Act 2002.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.