|
You can be more efficient with ILE also. Let me redefine the example below with some more complexity. Let's say that getAllocatedUnits(item_num) returns a numeric and you need a character, for whatever reason. You can wrap getAllocatedUnits(item_num) with %char and have the result put in units_allocated which is 5 alpha numeric. And you can do this all in one line! D units_allocated S 5 D item_num S 10 EVAL units_allocated = %char(getAllocatedUnits(item_num)) Aaron Bartell -----Original Message----- From: MWalter@hanoverwire.com [mailto:MWalter@hanoverwire.com] Sent: Thursday, June 21, 2001 10:05 AM To: RPG400-L@midrange.com Subject: RE: ILE Propoganda Rob, My argument would be that I like being able to use the results of the procedure in an expression. I think that: EVAL units_allocated = getAllocatedUnits(item_num) , is much more readable then: CALL 'PGMXXX' PARM item_num PARM units_alloc In my opinion, the coding is more self documenting and elegant. Just my 2 cents, Mark Mark Walter Sr. Programmer/Analyst Hanover Wire Cloth a div of CCX, Inc. mwalter@hanoverwire.com http://www.hanoverwire.com 717.637.3795 Ext.3040 rob@dekko.com Sent by: To: RPG400-L@midrange.com owner-rpg400-l@mi cc: drange.com Subject: RE: ILE Propoganda 06/21/01 10:29 AM Please respond to RPG400-L Yes, but the earlier question was how would that be different than a CALL? See, if you change the called program wouldn't that be just as seamless, if not more so, as changing a service programs subprocedure? Granted I would use the ILE approach, but this a strong argument to counter. Rob Berendt ================== A smart person learns from their mistakes, but a wise person learns from OTHER peoples mistakes. bill.reger@conver gys.com To: RPG400-L@midrange.com Sent by: cc: owner-rpg400-l@mi Subject: RE: ILE Propoganda drange.com 06/21/2001 07:43 AM Please respond to RPG400-L Local variables are nice, but the real beauty of using procedures and modules is the reusability and maintainability that you gain as time goes by. You might ask your new ILE programmer if he/she has ever had a situation where a calculation or routine needed to be modified but all the places where that calculation was coded either weren't known, all of the weren't found, or even if they were all found, how much time did it take to find them all and change them all. And then of course not all those calculations were coded the same so the programmer had to change them differently to achieve the same result. Once you've developed your store of procedures and modules, the maintenance effort is greatly reduced. Bill -- NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected. +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.