|
Bob wrote: >The example that Mark sent is close to correct, he omitted the "E" in >column 22 (I think?) so the example should be like this: > >> D xternalDS E DS extName(FileName) >> D field1 E extFLD(newField1) >> D field2 E extFLD(newField2) > >FYI, this is #3 dumb syntax in RPG IV on my list of top ten dumb syntax >issues in RPG IV. Why do we need an "E" if the EXTFLD() keyword is >there? Bob: I agree the syntax isn't pretty, but there were reasons for the design, and I'm sure you were told the reasons a long time ago. For the benefit of others, the justification for the design is rooted in the need for RPG IV to be functionally compatible with RPG III, which allowed program described subfields to be added to the end of externally described data structures. The E in position 22 was put there to distinguish the program described subfields from externally described subfields. Goofy syntax? Sure, OK. But that's not the worst problem with externally described data structures. The bigger problem is that EDS's only include the input-capable fields, which makes EDS's pretty much useless for WORKSTN record formats and output files. More goofy still is that it's not just input-capable fields, it's the fields that are listed by the API QUSLFLD as having input buffer end positions, which for some reason includes some output-only fields in certain situations! Anyways, I didn't post to get into a debate with Bob Cozzi on RPG IV language design. I just thought I'd use the opportunity to note that this is one area where RPG IV programmers should expect some improvements in a future release. People have asked for some more flexibility with ext-desc I/O, and allowing DS names on ext-desc I/O operations is one thing we're looking at. This would, of course, require improvements to EDS's. (You should also expect some improvements in the way search arguments are specified for keyed I/O operations.) Cheers! Hans Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.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.