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



Booth, (afaik, RPG-L wasn't open 'till late this afternoon, and my email has
been squirrely)

We're missing some of each other's points, I guess.  I may have missed the
definition of the /COPY book, if it was posted on another thread.  I agree
with what Andy Holmer recently posted.  I would add:

Focusing JUST on the code you posted, no you don't need more than a /COPY
and CALLP.  But that is not sufficient, because it won't compile (is my
understanding) unless the CALLP matches up to the Prototype defined in the
/COPY.  You do not HAFta have the Prototype in a /COPY, but it is a good
practice in order to make it easy to keep consistent throughout different
programs that use the procedure.  Similar to having external files, it makes
it easier to maintain if you have "externally defined" prototypes (and
Procedure Interfaces, according to some) via /COPYbook.  Whatever way you
implement the Prototype, it needs to match the CALLP.

Whether your pseudocode will work depends on how the Prototype is defined in
the copybook, which I didn't see posted.  I exaggerated some, but my point
was if you've bought this procedure from a vendor or some other source, you
should have docs on what the CALLP can look like...  If YOU are writing the
code, you just need the Prototype and the CALLP to match (number of parms,
data types, which are required and which are *NOPASS or *OMIT).  Again, you
just need a Prototype that matches to the CALLP, and the Prototype is
normally kept in a /COPY, but doesn't HAVE to be...  Maybe you already knew
this, so I may have been trying to answer a question you don't have.

And, unless I'm mistaken, IF the sub-procedure is written in RPGLE then the
prototype in the calling program MUST agree with the Procedure Interface
defined in the procedure, or the compiler will flag the error.  But if the
procedure is written in another language, then those languages do not have a
PI defined so there is no checking until run time.  (Could very well be
mistaken about this, but believe RPGLE is the only language at this time
which supports Procedure Interfaces.)  So if you don't have the source or
don't know the language, then all you need to know is what the Prototype
looks like.

I'm gonna bow outta this for now, but will be lurking to see if anyone posts
corrections or additions.



| -----Original Message-----
| [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Booth Martin
| Sent: Sunday, October 26, 2003 9:31 PM


| The question remains: do I need more than a /COPY statement and the callp
| line in the main program(s)?
|




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.