×
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.
Bruce Guetzkow wrote:
Adam: Just for giggles I'm going to try out your version, if for no other
reason than I just have to see it in action. Do I understand correctly that
you use the following at the start of each service program module:
/IF DEFINED(prototype-member-name)
/EOF
/ELSE
/DEFINE prototype-member-name
/ENDIF
Would this be before the H-spec (or does it even matter)? From a complexity
standpoint, that's pretty simple. And in the calling module just use
/COPY qmodsrc,prototype-member-name
Where prototype-member-name is the name of the module source. Do I have
this correct?
I think you've got the gist of it, but I'm not sure exactly what you
mean by "service program module". I'll give an example to make my
meaning is clear. We have prototypes in QCOPYSRC, and language specific
source files for source that will create a module. FWIW, I probably
wouldn't choose language-specific source files if it were up to me.
If I am creating a service program for character string utilities, I'd
do something like this:
QCOPYSRC,UTSTRING:
/IF DEFINED(UTSTRING_INCLUDED)
/EOF
/ELSE
/DEFINE UTSTRING_INCLUDED
/ENDIF
<prototypes and other global declarations follow>
QRPGLESRC,UTSTRING:
H nomain
D/copy QCOPYSRC,UTSTRING
<implementation follows>
I hope that makes it clear. I should note that I didn't come up with
this on my own, I think I got the idea from either Bob Cozzi or Bryan
Myers. Also, sorry for the delay in replying - Good Friday is a holiday
in Canada.
As an Amazon Associate we earn from qualifying purchases.
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.