|
Sudha, Yes this can be done. I have done implemented this technique using the space pointer instead of the retrieve user space API. It would be something like this: D UserSpacePtr * D DataStructurePtr * D Dsname ds Based(DataStructurePtr) D dsfield1 D dsfield2 . . . Create the user space here Set UserSpacePtr = User space pointer (QUSPTRUS API) DataStructurePtr = UserSpacePtr; // Populate the user space For counter = 1 to somenumber; Dsfield1 = somevalue1; Dsfield2 = somevalue2; . . . DataStructurePtr += %Size(Dsname); EndFor; // Retrieve the entries from the user space DataStructurePtr = UserSpacePtr; For counter = 1 to somenumber; Somevalue1 = dsfield1; Somevalue2 = dsfield2; . . . DataStructurePtr += %Size(Dsname); Endfor; HTH, Rick -----Original Message----- From: SRamanujan@xxxxxxxxxxxxxxxxxx [mailto:SRamanujan@xxxxxxxxxxxxxxxxxx] Sent: Monday, September 15, 2003 1:50 PM To: midrange-l@xxxxxxxxxxxx Subject: User Space Hi All, I am trying to putting a data structure into an User Space that I create. The way I have it is I place an data structure using a module and retrieve the information back from user space in another module. (I later intend to use multiple occurrence DS. Is this possible? Will the pointer be contiguous?). I seem to have problem with the data in the data structure when I retrieve from the user space. I see a few information of data structure appearing on the retrieve module but not the entire information. I am not able to understand what is wrong. Is it something to do with the size or is this not the best way to use a user space? Have you tried to do this and if so how did you resolve the problems encountered? Thanks, Sudha
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.