|
Hans, I guess I don't get it? What's the difference if EXTNAME is used on the or LIKEDS/LIKEREC? Can't we use any data structure today for the CHAIN opcode? For program-described I/O, I think you were referring to the resulting data structure of a CHAIN opcode and not the record length of a program described file. With a program described file, the record length in the RPG program does not need to match that of the actual database file. I often write "utility" code that has one big input field/buffer and then do an override to the real file name. Since I use a big buffer, I never have any problems. Of course I have never found a good use for the "read into a data structure" feature, except when trying to trick the compiler to read in the entire record in one operation instead of several little copy operations; one for each field. Having said that, a new function that simplifies the ability to pass the file I/O buffer between modules/procedures would be beneficial, and should be unrestrictive. Bob Cozzi Cozzi Consulting www.rpgiv.com -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Hans Boldt Sent: Monday, August 25, 2003 9:30 AM To: rpg400-l@xxxxxxxxxxxx Subject: Re: Record name the same as the file name Bob cozzi wrote: > Hans, > The change could be to just allow any Qualified data structure as the target > rather than a short list of specific keywords used when declaring a data > structure. What's the difference between LIKEREC and LIKEDS to the > Programmer? There should be no difference to the programmer. I could accept > a QUALIFIED limitation or no other limitation, but not a short list that > needs to be, (A) documented, (B) explained, (C) Taught, (D) Learned, and (E) > Comprehended. > I don't disagree with your argument, Bob. As I said, we've been flip-flopping ourselves on what to allow for result DS on externally described I/O. At one point, we were prepared to have only the requirement that the result DS have the same length as the record length of the record or file. (Just like with program described I/O.) Unfortunately, that didn't mesh well with certain other language features, like null-capable fields. And so we flip-flopped back to requiring some sort of definitional link between the record or file and the data structure. That is, either LIKEREC or LIKEDS where the definition can be followed back to the record. In practice, this is what you would do anyways even with less restrictive rules, since there would still be too much room for error otherwise. 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.