|
I am trying to have a multiple occurrence data structure and manipulate it using pointers. I am having a problem. I am always getting the last data I have entered. Here is the sample program: D Structure DS D Struct_F1 20 * D StructurePoint... D S * D SPH S * * D TestData S 20A * * Load the DS * C Eval SPH = %Addr(Structure) C Eval StructurePoint = %Addr(Structure) C Eval Struct_F1 = 'Position #1' C Eval StructurePoint = C StructurePoint + %Size(Structure) C Eval Struct_F1 = 'Position #2' C Eval StructurePoint = C StructurePoint + %Size(Structure) C Eval Struct_F1 = 'Position #3' * * Loop through the DS * C Eval StructurePoint = SPH C Eval TestData = Struct_F1 C Eval StructurePoint = C StructurePoint + %Size(Structure) C Eval TestData = Struct_F1 C Eval StructurePoint = C StructurePoint + %Size(Structure) C Eval TestData = Struct_F1 * C Return any ideas in where I am going wrong? what I am trying to accomplish is a have an unlimited number of data structure's sent to the program and in the program I loop through the data structures and process the information. The parms passed will be the pointer to the data structure and the number of occurrences. Thanks Mike ================================ Mike Silvers AS/400 Senior Programmer/Analyst AS/400 IBM Certified RPG IV Developer AS/400 IBM Certified Solutions Expert Hainey Business Systems 8 E. Canal St Dover, PA 17315 Branch Office: (410) 397-8739 Phone: (800) 932-3380 ext. 237 Fax: (717) 292-9474 Web: http://www.hbs-inc.com ________________________________ Providing E-Commerce, EDI, AS/400 Development, Java Development, and related services nationwide. ================================
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.