|
Actually Hans, that's not it at all. If I have a display file with one or two date fields in it (and we're talking RPGIII here) I would rather write two MULT and get it done than worry about setting up a DS in RPGIII and moving the bytes around. If I were reading say 100,000,000 database records and converting a date field in them, then I would probably use the DS method. -Bob -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Hans Boldt Sent: Thursday, February 26, 2004 2:42 PM To: rpg400-l@xxxxxxxxxxxx Subject: Re: Date compare Best Practices Bob Cozzi wrote: > There is nothing wrong with using the "MULT 10000.01" technique in RPGIII. I > do it every time I need to convert a date in that old language. > If you use it in RPG IV, then you are right it is a questionable choice. > The only other technique in RPG III is to use a data structure, but that can > be a bit more complex that the MULT. If you haven't seen it before then it > doesn't matter which one you use because the person maintaining the code > after you will have to deal with it, so just be sure to document it > properly. > -Bob Well, once you factor in the necessary comments, moving DS subfields still ends up as fewer source records. Not to mention 100-150 times faster. But why use a clear and efficient programming technique when there are some really cool ways (like that MULT trick) to show off your programming prowess? ;-) Cheers! Hans _______________________________________________ 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.