|
Well, Rob. You're still one-a my favo-RITES...;-D I believe, and some would agree and some would disagree, that issuing a "Commandment from God" is tripping out, and I believe most would find that to be an exhibition of very poor people-skills. There are differences in management styles, and I was told by one-a my mentors (a Controller in the "small" $200M company, and I've found in my experience) that the best managers will use different approaches depending on the individual they are working with. And one to eliminate ALL subroutines, at that...! Are you aware that (in tests I ran a few years ago, so newer hardware/software may be different) a BEGSR "call" is twice as fast as a bound call. As someone (I apologize, I forget who, several iirc) pointed out, when you are running a batch job over a million bazillion records, then a module makes one HECK of a performance difference over a program, which is one of it's many benefits. So, too, subroutines still have a use in some cases, just like primary files do. All that's new is not necessarily for the better, and all that's old is not necessarily for the worst. That is an oversimplification. | -----Original Message----- | From: rpg400-l-bounces@xxxxxxxxxxxx | [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of rob@xxxxxxxxx | Sent: Friday, October 24, 2003 10:58 AM | To: RPG programming on the AS400 / iSeries | Subject: Re: Benefits of Sub-procedures | | | I think that what you are saying is that if it's so simplistic that you | don't want to bother with PI's/PR's then you wouldn't want to bother with | BEGSR's/EXSR's. Interesting thought. | | By the way, I compiled a very simple program with a subroutine in it just | to see if it generated any messages like RNF#### - list of subroutines. | Nothing. Too bad, if there was I bet you could have CHGMSGD and | kicked up | the severity to a higher number. And that would have stopped the | compiler. I bet that's a technique not published in "How to Win Friends | and Influence People". :-) | | Rob Berendt | -- | "They that can give up essential liberty to obtain a little temporary | safety deserve neither liberty nor safety." | Benjamin Franklin | | | | | G Armour <garmour400r@xxxxxxxxx> | Sent by: rpg400-l-bounces@xxxxxxxxxxxx | 10/24/2003 09:30 AM | Please respond to | RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> | | | To | RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> | cc | | Subject | Re: Benefits of Sub-procedures | | | | | | | Hey, maybe have the precompiler search for BEGSR's and kill the compile? | | Rob, it's not that I'd never RETURN from within a subroutine. It's just | that I'd | never tolerate a one-statement subroutine. Never. Don't even go there. | | GA | | --- rob@xxxxxxxxx wrote: | > And that's a good way to evolve. | > | > Stop using subroutines, no matter how simple. And use subprocedures | > instead. While the subroutine may be too simplistic to make sense to | > bother with the PR's and PI's it's a good discipline to stick | to it as a | | > "Commandment from God" for two to three months just to get into | practice. | > And then, only then, go back to using subroutines when it's really | > simplistic. Or you have some special need like having RETURN exit the | > program and not just the subprocedure. (There are those who feel that | > exiting a program from a subroutine is a violation of structured | > programming and is punishable by (your humorous situation here)). | > | > Then as you evolve you can decide which subprocedures might make sense | to | > move to a service program. | > | > Rob Berendt | | | __________________________________ | Do you Yahoo!? | The New Yahoo! Shopping - with improved product search | http://shopping.yahoo.com | _______________________________________________ | This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list | To post a message email: RPG400-L@xxxxxxxxxxxx | To subscribe, unsubscribe, or change list options, | visit: http://lists.midrange.com/mailman/listinfo/rpg400-l | or email: RPG400-L-request@xxxxxxxxxxxx | Before posting, please take a moment to review the archives | at http://archive.midrange.com/rpg400-l. | | | _______________________________________________ | This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list | To post a message email: RPG400-L@xxxxxxxxxxxx | To subscribe, unsubscribe, or change list options, | visit: http://lists.midrange.com/mailman/listinfo/rpg400-l | or email: RPG400-L-request@xxxxxxxxxxxx | Before posting, please take a moment to review the archives | at http://archive.midrange.com/rpg400-l. |
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.