|
Pete wrote: >This discussion WAS about ILE RPG. The problem was (is?) that the D spec >does not allow the for specifying the storage type for a numeric field when >the declaration uses Like() in order to base the field on an external data >definition. This was a very frustrating limitation in V3R1 (my last >significant RPG development project). Has this been changed? Pete: No, we still don't allow overriding the internal format when defining a numeric field using keyword LIKE. However, other features added since V3R1 can help you achieve a good degree of data independence. Look at prototyped procedures. A procedure prototype can define a parameter LIKE some DB field. Fields passed as reference parameters can also be defined like that DB field. This way, you don't have to worry at all about the internal format of the numeric field or what format the parameter expects since you know the type and format will already match. Let's look at VALUE parameters. Chances are that most parameters passed to a procedure are not changed by the procedure. Or rather, you don't want the procedure to change the value. So, most parameters can be specified as VALUE parms. VALUE parms do not require exact format and length match. Here again, you don't have to worry about numeric data format since the appropriate conversions will be done for you automatically. I certainly agree that we should allow overriding the internal format on LIKE definitions, but you don't have to wait for that to achieve better data independence today. Cheers! Hans Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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.