|
Thanks Bob! I bungled the DS pointer for parameter three. One of
these days I will install QSYSINC!!!
On Fri, 8 Oct 2004 16:02:53 -0500, Bob Cozzi <cozzi@xxxxxxxxx> wrote:
> In the RPG xTools, I call the Change user space attribute immediately after
> creating the user space itself; thus making autoextend.
>
> If you don't have the xTools, here's the way it works:
>
> D UserSpaceAttr DS
> D nRecdCount 10I 0 Inz(1)
> D nAttrKey 10I 0 Inz(RTK_USKEY_EXT)
> D nAttrLen 10I 0 Inz(%Size(bExtend))
> D bExtend 1A Inz('1')
> D RtnLib S 10A
>
> *** Create your user space in QTEMP, then call the QUSCUSAT
> C CallP QusChgUsrSpaceAttr(rtnLib :
> C 'MYSPACE QTEMP' :
> C UserSpaceAttr : ApiErrorDS)
>
>
>
>
> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
> On Behalf Of Tony Carolla
> Sent: Friday, October 08, 2004 3:06 PM
> To: RPG programming on the AS400 / iSeries
> Subject: User Space size
>
> I am having a problem with my recent use of a user space.
>
> My module creates a user space in QTEMP, and gets a pointer to it
> using the QUSCRTUS and QUSPTRUS, respectively.
>
> I have an array defined, with 32000 elements, based on the pointer
> that points to the user space.
>
> I increment the array counter, and populate the array, and make use of
> the data later in the program by doing %lookups, etc, all the while
> tracking the number of elements in the array, to avoid accessing an
> element I have not placed any data into.
>
> It works beautifully, until I reach the extent of the user space.
> POOF. Is there a way to make a user space auto-extend? I thought
> they did that by themselves, but apparently not. If I allocate a
> ridiculous amount of storage when creating the user space, will it
> dynamically grab the space, or grab it all at once?
>
> --
> "Enter any 11-digit prime number to continue..."
> --
> 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,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
> --
> 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,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>
--
"Enter any 11-digit prime number to continue..."
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.