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



The EXTPGM is just a flag to the compiler that this is a prototype for a
dynamic call. From the manual

The EXTPGM keyword indicates the external name of the program whose
prototype is being defined.
The name can be a character constant or a character variable.
When EXTPGM is specified, then a dynamic call will be done.
*If neither EXTPGM or EXTPROC is specified, then the compiler assumes that
you are defining a prototype for a procedure*, and assigns it the external
name found in positions 7-21.
Any parameters defined by a prototype with EXTPGM must be passed by
reference. In addition, you cannot define a return value.

On Fri, May 22, 2009 at 8:45 AM, <Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx> wrote:

using EXTPGM will always be a "dynamic" binding, same as using a CALL
opcode. so the compiler doesn't check for the external object.

Thanks,
Tommy Holden



From:
Bryce Martin <BMartin@xxxxxxxxxxxx>
To:
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Date:
05/22/2009 09:43 AM
Subject:
Re: EXTPGM keyword
Sent by:
rpg400-l-bounces@xxxxxxxxxxxx



To verify what Alan just said. I had a module up that I just compiled
that a PR with extpgm. I changed it to one that didn't exist and it still

compiled. This value must only be checked at run time. I always assumed,

like you David, that the compiler would have done a verification. It
obviously isn't doing any kind of binding to that external program if this

is the case so it doesn't matter to the Module when it gets created. I
would recommend that it be there before you use the module to call it
though ;)


Thanks
Bryce Martin
Programmer/Analyst I
Ext. 4777



Alan Campin <alan0307d@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
05/22/2009 10:22 AM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: EXTPGM keyword






The compiler just want some value. It doesn't seem to care what it is.

On Fri, May 22, 2009 at 8:20 AM, David FOXWELL
<David.FOXWELL@xxxxxxxxx>wrote:

Hi,

I just opened up a source member that I need to modify and found this.


D Prc PR EXTPGM ( 'XXX210' )

D Parm1 etc

D Parm2 etc



D Prc PI

D Parm1 etc

D Parm2 etc

Just realised I don't fully understand EXTPGM as XXX210 is obviously an
error. The source, module and program are all named XXX110.

Would somebody care to enlighten me?

Thanks.




--- This message (including any attachments) is intended only for the use
of the individual or entity to which it is addressed and may contain
information that is non-public, proprietary, privileged, confidential, and
exempt from disclosure under applicable law. If you are not the intended
recipient, you are hereby notified that any use, dissemination,
distribution, or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify us and
destroy this message immediately. ---
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-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.