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



Your statement "I'd suggest keeping it, since, once again, the goal will be for the caller to be able to USE that prototype to call your program." tells me that I have to have the called program prototyped with an EXTPGM, in order to be able to call it from another program. I was merely clarifying that, only the calling program must have the EXTPGM keyword on the DSPECS, not the called program. If you want to keep these conformed, then yes I agree, put the EXTPGM in both the caller and the callee, but it's not necessary to have it in the callee.

That's true. However, except in very unusual circumstances you shouldn't have two copies of your prototype. The caller and callee shoudl both be using the SAME prototype (via the /COPY directive).

If you code a separate prototype in the caller and callee, you're missing out on one of the biggest advantages of prototypes! PRototypes protect you against passing incorrect parameters. The way they do that is by making sure that the variables you pass as parameters match the prototype, and by making sure the prototype matches the PI.

If you write a separate prototype, then it hasn't been compared to the PI, and therefore, you're losing that protection.

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.