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

At 3/24/03 06:35 PM, you wrote:
Mark, prototypes are meant to be used by both calling programs and the
program itself (so for EXTPGM, the prototype should be in a /copy
file).  The EXTPGM keyword is really more for the callers anyway, so I
think it should be hardcoded.  For the program itself, if the command's
PGM parameter and the EXTPGM parameter are different you just get a sev
10 message; the EXTPGM parm is ignored and the program gets created
exactly the same as if you had the EXTPGM correct.

I've been thinking about this (and using /COPY in my programs) and have come to the conclusion that I'd still like to have the EXTPGM(*CURRENT). Here's why. I've found that the best compromise between flexibility and simplicity is coding like this:


D MyPgm PR              EXTPGM( 'MyRealPgm' )
 /COPY MyRealPgm@

D MyPgm PI
 /COPY MyRealPgm@

where MyRealPgm@ contains the fields and parm attributes. This keeps the fields in sync, but avoids having to define conditional compiler directives to make sure the specific lines (PR vs. PI) get included. It also helps readability, IMHO, when trying to figure out definitively which procedure is being called.

Having EXTPGM(*CURRENT) would document that this is really a replacement for *ENTRY PLIST. Am I missing something major here?

-mark


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.