USER_SPACE_INFO view

The USER_SPACE_INFO view returns the attributes of user spaces.

The values returned for the columns in the view are closely related to the values returned by the Retrieve User Space Attributes (QUSRUSAT) API.

Authorization: The caller must have:
  • *EXECUTE authority to the library containing the user space, and
  • *USE authority to the user space.

The following table describes the columns in the view. The system name is USRSPC_INF. The schema is QSYS2.

Table 1. USER_SPACE_INFO view
Column Name System Column Name Data Type Description
USER_SPACE_LIBRARY USRSPC_LIB VARCHAR(10) Library containing the user space.
USER_SPACE USRSPC VARCHAR(10) Name of the user space.
SIZE SIZE INTEGER The size of the user space object in bytes.
EXTENDABLE EXTENDABLE VARCHAR(3) Whether the space is extended automatically by the system when the end of the space is encountered.
NO
Space is not automatically extendable
YES
Space is automatically extendable
INITIAL_VALUE INITIAL BINARY(1) The initial value to which future extensions of the user space will be set.
OBJECT_DOMAIN DOMAIN VARCHAR(7) The domain of the object.
*SYSTEM
The object is in the system domain.
*USER
The object is in the user domain.
TEXT_DESCRIPTION TEXT VARCHAR(50)
Nullable
The text description of the user space.

Contains the null value if the user space has no description.

Example

  • Return a list of user spaces in MYLIB.
    SELECT USER_SPACE, SIZE, TEXT_DESCRIPTION FROM QSYS2.USER_SPACE_INFO
      WHERE USER_SPACE_LIBRARY = 'MYLIB';