Hi,
is the size of user space auto resizable?
I tested creating a user space with the initial length to 1
QUSCRTUS(userSpace, /* User space name and library */
"temporal ", /* Extended attribute (QUSLOBJ) */
1, /* Size of the user space */
&spaceInit, /* Space initialization */
"*ALL ", /* Public authority to user space */
"TEMP ", /* User space text */
"*NO ", /* Replace existing user space? */
errorCode, /* Error Code */
"*USER "); /* Domain of created user space */
and used the QUSLOBJ API to dump data in it, there is not invalid pointer message nor any error, that test make me thought that the user space is auto resizable but in the documentation indicates that the QUSCUSAT is required to truncate or extend the user space.
In other references that I found into internet says: 'user spaces automatically expand as needed to hold the data placed in them.'
Thanks
Software/Hardware used:
v5r4
ASKED:
January 9, 2013 4:38 PM
UPDATED:
January 9, 2013 6:19 PM
To continue Bruce’s comment, your code can work similarly to IBM’s list APIs. You can use QUSCUSAT to switch Automatic extendibility on or off. Other references are correct; user spaces can automatically expand when you write past the current end of the space — you just need to set the Automatic extendibility attribute appropriately (and perform valid operations). Rely on “other references that [you find on the] internet” as a guide for further investigation. But rely on official documentation for answers. — Tom
Thanks.