× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks Rick. This should help me immensely! I came up to setting the
user space pointer to ds.  But am not moving dsfield value one by one.
Actually, my ds is a record format of the file which gets loaded by sql
call to the file. Perhaps, I need to load this sql (fetch) within the
for statement that you have.

Another question, how did you determine the size and how did you move it
to the binary field.  Though a dumb question, I have tried, hexa, just
plain move but it blows up saying the size is 0.  My ds is around 2000
and I need 200 of these into user space.

Thanks for all the help,
Sudha

Sudha Ramanujan
SunGard Futures Systems
sramanujan@xxxxxxxxxxxxxxxxxx
(312) 577 6179
(312) 577 6101 - Fax


-----Original Message-----
From: Chevalier, Rick [mailto:Rick.Chevalier@xxxxxxxxxxxxxxx] 
Sent: Monday, September 15, 2003 2:42 PM
To: Midrange Systems Technical Discussion
Subject: RE: User Space

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



_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.