|
Gary, You are right as far as you went. I have been using Externally defined D/S's since 1984 on the Sys/38 and you know we didn't have Procedures till just now. I said "When I use parameter lists" . When I am coding Procs, I don't, just for the reason you said. However, I was talking with Phil Coulhard about this old technique, and then the subject turned to PCML. Which is really where I was trying to go with Externally Defined D/S's as the interface definition. To externalize it from the program. To me the bigger sin(being a data base bigot) is using a 15,5 parameter variable for (say) a customer number or invoice number when my data dictionary defines it as 7,0. I want that attribute of the DB customer entity to cascade everywhere I used customer number. In every file,(PF,DSP,PRTF) AND ALSO in program to program interface definitions!! Hence the attempt to root the definition of variable definition in my data dictionary. BTW, this helped tremendously during Y2k. Since our interface were structures(defined with PF's) we knew EVERY place a date was being passed as a parameter! But passing a zoned variable and the receiving proc, seeing it as Packed (or date from *USA and the proc seeing it as *ISO) along with compile time verification is a good thing. Well I'm rambling again, But you and I are on the same side with this one Gary. We both want a well defined, verifiable function to function interface definition. BTW, what does everyone thing of the possibilities of PCML to help in this area??? Respectfully John Carr ------------------ Ah, but there are excellent reasons to pass individual parameters. With procedural RPG, you have parameter validation that occurs before run-time (nice to avoid those failures). Additionally, use of a data structure removes considerable flexibility. You can no longer take advantage of those situations that allow you to do such things as pass numeric parameters without worrying whether it is packed, zoned, ... Of course, there are circumstances in which passing a data structure as a parameter is indeed appropriate. However, I don't feel that using one to avoid passing individual parameters qualifies as one of those circumstances. Gary Guthrie REAL Solutions Technical Support NEWS/400 Technical Editor +--- | 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.