Difference between EXTPGM and EXTPROC

335 pts.
Tags:
AS/400
EXTPGM
EXTPROC
RPGLE
Could someone please let me know what is the difference between EXTPGM and EXTPROC? In which scenario EXTPGM is used and in which scenario EXTPROC is used? What are the limitations of EXTPGM over EXTPROC? If possible could you please let me know the difference with a sample program as an example. Thanks in advance

Software/Hardware used:
iseries

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    The difference is that one references an external program and the other references an external procedure. . CALLP is "Call with Prototype". A prototype can reference an external *PGM by using the EXTPGM() keyword. That makes it essentially an enhanced version of the CALL op-code. Or a prototype can reference a procedure exported from another *MODULE that is bound into the calling program by using the EXTPROC() keyword. That makes it essentially an enhanced version of the CALLB op-code. (The exported procedure could be from a *MODULE of a bound *SRVPGM.) . So, additional differences are all of the differences between calling programs and calling procedures. A major example of a difference there is that procedure parameters can be passed by value, while programs can only receive parameters by reference (i.e., by address). . Prototypes for other procedures that are in the same *MODULE do not need EXTPGM() nor EXTPROC(). . Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following