There is no real difference between *USRSPC storage and allocated
storage (other than the permanence of the *USRSPC).
If you're using the QUSCHGUS and QUSRTVUS APIs then I can believe
they'll be slower than direct pointer access to storage however you
can get a pointer to the user space and then it's just as fast as
your allocated storage method.
OK, I need clarification.
Are we saying I can create a User Space and retrieve the pointer to the
beginning of the storage within it, and I can then write directly to that
pointer and the storage will expand as I need it to? If that is the case then
User Spaces are better than I thought.
It was my understanding though, that the storage within a User Space would only
expand if you used the QUSCHGUS API to write to it. If that is the case then my
statement still stands. What possible benefit would a User Space have over a
standard data pointer other than the permanence of the data? If all I get is a
regular pointer then I there is no point using a User Space. If I wanted the
data within a permanent store I'd use a stream file.
f you see significantly slower access times using a pointer to a
user space than using a pointer to allocated storage then I'd like to
see your test code.
Sadly, its no longer my code - it was performed 3 years ago, for another
employer, in another hemisphere. But the results were valid. Of course, the
access to the User space data was via the APIs, not direct pointer access, and
the time for the creation of the User Space was also included in some of the
tests. But an overhead is an overhead however you slice it.
Maybe user spaces have a use as a temporary data storage used by multiple jobs
if they are faster than using stream files.
I am wiling to be convinced.
Meet singles near you. Try ninemsn dating now!
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives