Retrieve User Index Attributes (QUSRUIAT) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: Yes

The Retrieve User Index Attributes (QUSRUIAT) API retrieves information about the current attributes and the current operational statistics of the user index.

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


Authorities and Locks

User Index Library Authority
*EXECUTE
User Index Authority
*USE
User Index Lock
*SHRUPD

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 if you specify the length of receiver variable 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 index information returned.

The format name supported is:

Refer to IDXA0100 Format for details on the format.

Qualified user index name
INPUT; CHAR(20)

The user index for which you want to retrieve information, and the library in which it is located. The first 10 characters contain the user index 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.


IDXA0100 Format

The following information is returned for the IDXA0100 format. For detailed descriptions of the fields in the table, see Field Descriptions.



Field Descriptions

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.

Entry length. For user indexes with fixed-length entries, this is the length of each index entry. For user indexes with variable-length entries, this is equal to the longest entry that has ever been inserted into the index. Valid values are from 1 through 2000.

Entry length attribute. The types of entries in the user index.

Possible values are:

Immediate update. Whether or not the updates to the index are written to auxiliary storage on each update to the index.

The possible values are:

<Index size option. The maximum size of the user index.

The possible values are:

Key insertion. Whether or not the inserts to the index are by key.

Key length. The length of the key where the first byte of an entry is the beginning of the key for the index entries. This field will be 0 for a nonkeyed user index.

Maximum entry length. The maximum entry length any user index entry can have.

Number of entries added. The number of entries added to the user index. The number of entries currently in the index can be obtained by subtracting the number of entries removed from the number of entries added.

Number of entries removed. The number of entries removed from the user index.

Number of retrieve operations. The number of times either the FNDINXEN (find independent index entry) MI instruction or Retrieve User Index Entry (QUSRTVUI) API has been used on this user index. The QUSRUIAT API or MATINXAT (materialize independent index attributes) MI instruction sets the number of retrieve operations to 0 after the retrieve or materialize operation is completed.

Optimized processing mode. Whether the user index is maintained in a manner that optimizes performance for:

Reserved. An ignored field.

User index library name. The name of the library containing the user index. This information is helpful when *CURLIB or *LIBL is specified in the qualified user index name parameter.

User index name. The name of the user index.


Error Messages



API introduced: V2R3

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