|
Yes it's a good way to do it. The other way is with the chg usr data API, in your situation, a pointer is the best performance. -Bob Cozzi On 6/22/06 3:46 AM, "Knezevic.Mihael" <Mihael.Knezevic@xxxxxxxxxxx> wrote:
hello, i got a simple question about writing to a userspace because it is not 100% clear to me. i got a userspace (which is set to autoextend) and in my rpg program i am retrieving a pointer to that userspace. through pointer arithmetic i am filling the userspace with some values. D usPtr S * D usData DS based(usPtr) qualified D header likeds(wws_main_us) D usDataPtr S * D vkst S 5 0 based(usDataPtr) dow (not %eof); usDataPtr = usPtr + %len(usData.header) + (i * %size(vkst)); vkst = someValue; i += 1; read file; enddo; is this the right way to fill a userspace (it seems to be the easiest) ? and is the userspace auto extending when i'm not using the os400 api to write to it? thanx for any answers mihael knezevic
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.