|
Joe, These areas are level-05 entries copied into your program by the pre-compiler. They do not overlap in the example I provided because your telling the compiler to copy a *single* input (or output) record format individually. Try it an see :) You may be thinking of this scenario: 01 DSPFILE-area. copy dds-all-formats of OE314D. The above case is where you run into overlapping structures due to the "redefines" statement inserted by the compiler. This can cause horrific problems and is best avoided if at all possible. Terry > -----Original Message----- > From: Joe Pluta [mailto:joepluta@PlutaBrothers.com] > Sent: Tuesday, August 13, 2002 9:57 AM > To: cobol400-l@midrange.com > Subject: RE: Need for separate Input and Output Areas in Display File > > > > From: R. Bruce Hoffman, Jr. > > > > no offense intended here, Joe, but that's an RPG programmer's view. > > Bruce, you miss my point. With this code: > > 01 DSPFILE-area. > copy dds-m1map-o of OE314D. > copy dds-m2ctl-o of OE314D. > copy dds-m2sfl-o of OE314D. > copy dds-m2key-o of OE314D. > > The four data structures OVERLAP. Changing a field in > dds-m1map-o will ALSO > affect all three other formats. And it's unlikely that those > changes are > ones you want. With this technique, I can't just initialize > a field in > dds-m2ctl-o and be assured it will stay that way throughout > the life of the > program. > > I understand all about MOVE CORR and the joy it brings. I use it > extensively in my COBOL version of PSC/400. But I ran into > difficulties > with the above coding technique. > > Joe Pluta > www.plutabrothers.com > > > _______________________________________________ > This is the COBOL Programming on the iSeries/AS400 > (COBOL400-L) mailing list > To post a message email: COBOL400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/cobol400-l > or email: COBOL400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/cobol400-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.