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



You have to distinguish between two different
ways of using a prototype
with EXTPGM:
1) As a prototype for calling other programs.
The EXTPGM name determines
the program that gets called;
2) As a way to define your own *ENTRY PLIST (in
combination with a
procedure interface) - here the EXTPGM name does
not really matter. You
will get an RNF3776 message with severity 10 in
your compiler listing.

Ordinarily the following code would appear in a
Subprocedure for the definition of the "entry
parameters",

D MyProgram Pr
D 5p 0
Const
D 5a

D MyProgram Pi
D InputNumber 5p 0 Const
D OutputChar 5a

(Note the EXTPGM and EXTPROC keywords are absent
on the PR - so EXTPROC is assumed.)

However, if the above is coded in a Main Procedure
AND separate CRTRPGMOD + CRTPGM
commands are used, the above works equally well
for the definition of Program entry parameters.
The absence of the EXTPGM keyword avoids any
confusion.

Brian Parkins


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.