|
If the value of INDEX-TBL03 is something greater than 400, then it will cause index03 to point to memory past TBL03 which would be TBL04. Check for that and see what's in INDEX-TBL03. -----Original Message----- From: rick.baird@xxxxxxxxxxxxxxx [mailto:rick.baird@xxxxxxxxxxxxxxx] Sent: Thursday, June 10, 2004 4:27 PM To: cobol400-l@xxxxxxxxxxxx Subject: [COBOL400-L] RE: I'm stumped - working storage tables indexed by -WTF? ok, now I'm really confused. I put a watch on the variable to see when it gets changed (sign in the middle of a packed field) this is what I found: Given the following working storage definitions: 01 TBL03. 02 TBL03A OCCURS 400 TIMES INDEXED BY INDEX03. 03 TBL03-LLL PIC 9(04) COMP. 03 TBL03-ADDR PIC X(25). 02 INDEX-TBL03 PIC 9(04) COMP. 01 TBL04. 02 TBL04A OCCURS 200 INDEXED BY INDEX04. 03 TBL04-INGREDIENT PIC 9(06) COMP. 03 TBL04-PRICE PIC 9(02)V9(04) COMP. 03 TBL04-MEASURE PIC X(10). 03 TBL04-DESCRIPTION PIC X(30). 02 INDEX-TBL04 PIC 9(03) COMP. 02 INDEX-TBL04-LO PIC 9(03) COMP VALUE 001. my watch told me that TBL04-INGREDIENT(3) changed after executing this line: SET INDEX03 TO INDEX-TBL03 --> MOVE M2REST OF MENUS-REC TO TBL03-LLL(INDEX03) SET INDEX03 TO 1 how the heck does that happen? The tables are in 2 separate spots, but changing one overlays the other? sounds like a bug to me.... _______________________________________________ This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list To post a message email: COBOL400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/cobol400-l or email: COBOL400-L-request@xxxxxxxxxxxx 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.