|
Hi all, I believe I have found a problem with the new Array Data Structures in v5r2 and wanted to know if anyone else has run across this yet. ** code snippet ** D parentList ds dim(100) qualified D item 15a D qty 9p 0 D childList ds dim(100) qualified D item 15a D qty 9p 0 /free clear parentList; parentList(1).item = stPrdI; parentList(1).qty = stPlgQ; clear childList; /end-free When I follow this in the debugger, here is what happens. The first three lines work as expected by initializing all elements in parentList and assigning values to element 1. The second clear operation initializes all elements of childList but it also sets element 1 of parentList back to blanks and zeros. I suspect the compiler is laying out the data structures in alphabetical order and the clear operation is clearing too much storage by the length of one element. To test my theory, I added another data structure as follows: D dummyList ds dim(100) qualified D item 15a D qty 9p 0 I placed it before the others in the source. As I suspected, the statement that clears childList, initialized element 1 of dummyList and did not touch parentList. Is this a known problem? Is there a fix yet? If not, how do I report it? Thanks, Seth Shields, Blum, Inc.
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.