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



I agree this whole thing gets to be a religious issue. Shouldn't be but it is. 

I think one issue that has only been touched on with using subroutines vs. 
procedures and that is static storage. 

In writing an RPG IV program, static storage should be reduced to the absolute 
minimum that you need. One of the primary values of using subprocedure is that 
you have local variables. Unless you are using subroutines inside procedures, 
you end up with everything being global and everything static. 

The more static variables that use, the more work the operating system has to 
do to manage that static storage. You will find article from Susan Gartner when 
she was still with IBM talking about just this problem on the web.

"C" type languages, which RPG IV is, are very efficient at managing automatic 
storage (local variables) and very inefficient at managing static storage. A 
well written RPG IV ILE program should have almost no static storage other than 
maybe what is brought in by files and embedded Sql on reduce that even more. 
Using service programs to implement file I/O can reduce that to almost nothing. 
 

A procedure can be a black box. A subroutine can never be. When I write a 
program, each procedure is a black box, self contained to do it's job referring 
to global variables as little as possible. Why would I want to keep referring 
up to a long list of global variables when I can just have the variables I need 
to solve the problem in the procedure? Why have to think about the whole 
program when I can think about nothing except the problem I am working on? 
That's why I use procedures!

Oh well. Like I said. Religious issue. I have this on going battle with the guy 
next to me who refuses to use subprocedure for all the same reasons. All you 
can do is not talk about it or the air heats up.

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.