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



Hi Bob -

I personally have been using RPGIV and sub-procedures, service programs,
etc. since '96.  But I am running into an ever increasing number of
programmers that ask the basic question "Why use a sub-procedure when it
does the same thing as a program call?"
<snip>
p.s. And I have tried arguing easier maintenance - which they will
always argue that pure ILE RPGIV is harder to maintain because of the
increased number of objects and source members to keep track of!

Huh???? If they are writing API-type programs to encapsulate functions, service programs will REDUCE the number of objects. One service program can perform the functions of many separate API-type programs.


Another major benefit of procedures (even non-exported procedures within the same program that calls them) is the use of const and the resulting ability to pass expressions as input parameters to the procedure.

And along with that, as you mentioned, the capability to receive a value back into an expression.

Then combine that to have an expression involving the output of multiple procedures as an input parameter to yet another procedure. (Whose output could be the input to yet another procedure in the same overall expression.)

And how about the ability for a procedure to call itself recursively? That can be nice for chasing chains as long as it doesn't go too deep.

Ken
http://www.ke9nr.net/
Opinions expressed are my own and do not necessarily represent the views of my employer or anyone in their right mind.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.