Retrieve User Space Attributes (QUSRUSAT) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: Yes

The Retrieve User Space Attributes (QUSRUSAT) API retrieves information about the current attributes and the current operational statistics of the user space.

The QSYS2.USER_SPACE_INFO view can be used as an alternative to this API. See USER_SPACE_INFO view for more information.

You can also retrieve information about user space attributes by using one of the following:


Authorities and Locks

User Space Library Authority
*EXECUTE
User Space Authority
*USE
User Space Lock
*SHRNUP

Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The variable that is to receive the information requested. You can specify the size of this area to be smaller than the format requested as long as you specify the length parameter correctly. As a result, the API returns only the data that the area can hold.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable. If the length is larger than the size of the receiver variable, the results may not be predictable. The minimum length is 8 bytes.

Format name
INPUT; CHAR(8)

The format of the space information to be returned.

The format names supported are:

Refer to SPCA0100 Format for details on the format.

Qualified user space name
INPUT; CHAR(20)

The user space for which you want to retrieve information, and the library in which it is located. The first 10 characters contain the user space name, and the second 10 characters contain the library name.

You can use these special values for the library name:


Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


SPCA0100 Format

The following information about a user space is returned for the SPCA0100 format. For detailed descriptions of the fields in the table, see Field Descriptions.



Field Descriptions

Automatic extendibility. Whether or not the space is extended automatically by the system when the end of the space is encountered.

Bytes available. The length of all data available to return. All available data is returned if enough space is provided.

Bytes returned. The length of the data actually returned.

Initial value. The initial value to which future extensions of the user space will be set.

Space size. The size of the user space object in bytes.

User space library name. The library in which the user space is located. This is helpful when *LIBL or *CURLIB is specified as the library name in the qualified user space name parameter.


Error Messages



API introduced: V2R3

[ Back to top | Object APIs | APIs by category ]