CHANGE_USER_SPACE_ATTRIBUTES procedure
The CHANGE_USER_SPACE_ATTRIBUTES procedure changes the attributes of a user space (*USRSPC) object.
The values used by the procedure are closely related to the values handled by the Change User Space Attributes (QUSCUSAT) API.
Authorization: The caller must have:
- *EXECUTE authority to the library containing the user space, and
- *CHANGE and *OBJMGT authority to the user space.
The schema is QSYS2.
- user-space
- A character string containing the name of the user space to be changed.
- user-space-library
- A character string containing the name of the library containing the user space to be changed.
Can be one of the following special values:
- *CURLIB
- The job's current library is used.
- *LIBL
- The library list is used. This is the default.
- size
- An integer value specifying the size, in bytes, of the user space object. This value must be from 1 byte to 16,773,120 bytes. If the value is smaller than the current size of the space, the user space is truncated. If it is larger, the space is extended.
- extendable
- An character string that indicates whether the user space can be automatically extended.
- NO
- The user space is not automatically extendable.
- YES
- The user space is automatically extendable.
- initial-value
- A one byte binary value containing the initial value to which future extensions of the user space will be set. The best performance is when this value indicates hexadecimal zeros (BX'00').
- transfer-size
- An integer value that indicates the number of pages to be transferred between main storage and auxiliary storage. This is only a request, as system processing can use a value of its choice in some circumstances. Allowable values are from 0 to 32 pages. A value of 0 indicates that the default transfer size for the user space should be used. A larger transfer size may allow for better performance of applications processing the user space.
Example
- Truncate user space USRSPC1 in APPLIB to a size of 200 bytes.
CALL QSYS2.CHANGE_USER_SPACE_ATTRIBUTES(USER_SPACE => 'USRSPC1', USER_SPACE_LIBRARY => 'APPLIB', SIZE => 200);