|
"fire is useful" lol Scott Klement <klemscot@xxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 10/23/2003 11:45 AM Please respond to RPG programming on the AS400 / iSeries To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc: Subject: RE: Benefits of Sub-procedures > I must be missing something. While I agree with the use of procedures, > modules and service programs I don't see them reducing the number of > objects. > > Module --> Service Program --> Application = 3 objects > or > Module1 \ > Module2 --> Service Program --> Application = 5 objects > Module3 / > > vs. > > Bound program ---------------> Application = 2 objects > or > Bound program1 \ > Bound program2 -------------> Application = 4 objects > Bound program3 / I assume you mean "bound modules?" In which case, you've got a big problem here. Every time you change the code in a module, you have to search out and re-bind every program that uses that module. That's a major maintenance nightmare for a shop like mine where there are 5000 programs. The original poster asked why not create programs instead of service programs, still making them modular, but calling programs instead of subprocedures. That changes your diagram to: Module1 \ Module2 --> Program --> Application = 5 objects Module3 / Which is the same number of objects as the service program. But, it's got a big disadvantage over a service program, doesn't it? It's only got one callable routine -- the program itself. A service program can have many subprocedures that you can call. So, therefore, for each subprocedure in your service program, you have to create a separate program. My average service program probably has about 10 routines in it. Therefore, if I used programs, I'd have about 10 times as many objects as service programs. Then, when you add to that the performance difference, and the inability to use the signature "level checking" that service programs give you, etc, etc, etc... you start wondering why someone would ever argue things the other way? What's the advantage of using separate callable programs instead of service programs? The advantage to callable programs is that your 90 year old programmers (who haven't yet agreed that fire is useful) are able to use the callable programs. _______________________________________________ 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.