|
Personally I only use the "read all SFLRCDS" method if the subfile is a SFLPAG=SFLSIZ. If the program loads hundreds of records, it's insane to read hundred as opposed to the 2 records the user selected... just my 2 cp... Thanks, Tommy Holden -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Joe Pluta Sent: Monday, August 15, 2005 8:47 AM To: 'RPG programming on the AS400 / iSeries' Subject: RE: Force EOF in a Subfile > From: Booth Martin > > As to efficiency in programming... who cares about efficiency? We care > about effectiveness, not efficiency. Programs using subfile and READC are > user interface programs, where the importance is in ease of user use and > future maintenance and understanding. Looping 500 or even 2500 times > instead of 1 or 2 times is trivial and of no consequence. I respectfully, but completely, disagree with this statement. Efficiency in programming is crucial -- it's the difference between a program that runs and one that runs well. This sort of thinking MAY BE (emphasis on "may") fine on a dedicated client, but it's death for a machine with 1000 users, because suddenly instead of 2500 extra reads you've got 2.5 MILLION and that can be the difference between a program with subsecond access and a program with two-second access. Yes, there are a hierarchy of factors to be addressed, with the topmost always being "does this make my company more successful"? And of course, "more successful" depends on whatever upper management thinks it is. But in the long run, efficiency is crucial, if not critical, to the long-term health of your systems. Bloated code got us Windows, and Office, and EJB. RPG is built to create tight code... shame on the programmer who doesn't use it that way. Joe
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.