Retrieve Current Attributes (QWCRTVCA) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: Conditional; see Valid Key Attributes.

The Retrieve Current Attributes (QWCRTVCA) API retrieves job and thread attributes that apply to the thread in which this API is called. If a thread attribute exists, it is retrieved. If a thread attribute does not exist, the job attribute for the job in which this thread is running is retrieved.


Authorities and Locks

None.


Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The variable that is used to return the thread attributes.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable.

Format name
INPUT; CHAR(8)

The format of the attribute list to return. The possible format names follow:

See RTVC0100 Format, RTVC0200 Format, and RTVC0300 Format for more information.

Number of attributes to return
INPUT; BINARY(4)

The number of attributes to return in the specified format.

Key of attributes to be returned
INPUT; ARRAY(*) of BINARY(4)

The list of the attributes to be returned in the specified format. For a list of the valid key attributes, see Valid Key Attributes.

Error code
I/O; CHAR(*)

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


RTVC0100 Format

The following table describes the order and format of the data that is returned in the receiver variable for format RTVC0100. See Valid Key Attributes for threadsafe information.



Field Descriptions

Data. The data returned for the key field.

Key. The attribute returned. See Valid Key Attributes for the list of valid keys.

Length of attribute information returned. The total length of information returned for this attribute. This value is used to increment to the next entry in the list.

Length of data. The length of the data returned for the field.

Number of attributes returned. The number of attributes returned to the application.

Reserved. An ignored field.

Type of data. The type of output data. This field is provided to maintain the same format layout that is used in the Change Job (QWTCHGJB) API.



RTVC0200 Format

The RTVC0200 format returns library list information. Retrieval of the library list information is threadsafe. The format returns the actual length instead of the total length because all libraries may not exist.



Field Descriptions

Current library existence. Whether the current library exists or not. This value will be zero if the current library was not requested.

Number of bytes available. All of the available bytes for use in your application.

The actual length depends on how many libraries are in the library list.

Number of bytes returned. The number of bytes returned to the user. This may be some but not all of the bytes available.

Number of libraries in SYSLIBL. The number of libraries in the system part of the thread's library list. This value will be zero if system libraries were not requested.

Number of libraries in USRLIBL. The number of libraries in the thread's user library list. This value will be zero if user libraries were not requested.

Number of product libraries. The number of product libraries found in the thread's library list. This value will be zero if product libraries were not requested.

Library list (for each library in the list). The list of all libraries requested. A blank is in the last position of each name. The number of libraries in the list will depend on the keys requested and the actual number of libraries in each portion of the library list. The order of the library list is:


RTVC0300 Format

The RTVC0300 format returns auxiliary storage pool (ASP) group information. Retrieval of the ASP group information is threadsafe.



Field Descriptions

ASP group information entry. The auxiliary storage pool (ASP) group information requested. This does not include the system ASP or the basic user ASP.

Length of one ASP group information entry. The length of one ASP group information entry.

Number of ASP group information entries The number of ASP group information entries being returned.

Number of bytes available. The number of available bytes for use by your application.

Number of bytes returned. The number of bytes returned to the user. This may be some but not all of the bytes available.

Offset to ASP group information The offset in characters (bytes) from the beginning of the receiver to the first ASP group information entry.


Format of ASP Group Information Entry

The ASP group information entry describes the data that is returned for each ASP group of the RTVC0300 format.



Field Descriptions

ASP group name The name of the ASP group. This is the name of the primary ASP device in an ASP group.


Valid Key Attributes

The following table contains a list of the valid keys for format RTVC0100. In addition, the table indicates whether the attributes are threadsafe. See Key Field Descriptions for the descriptions of the valid key attributes.

The following table contains a list of the valid keys for format RTVC0200. In addition, the table indicates whether the attributes are threadsafe. See Key Field Descriptions for the descriptions of the valid key attributes.

The following table contains a list of the valid keys for format RTVC0300. In addition, the table indicates whether the attributes are threadsafe. See Key Field Descriptions for the descriptions of the valid key attributes.



Key Field Descriptions

Most field descriptions for this API are in Work Management API Attribute Descriptions (WMAttrDesc), except the following:

All portions of the library list for format RTVC0200. All portions of the library list will be returned.

Current system pool identifier. The identifier of the system-related pool from which this thread's main storage currently is being allocated. These identifiers are not the same as those specified in the subsystem description, but are the same as the system pool identifiers shown on the system status display. If a thread reaches the end of its time slice, the pool this thread is running in can be switched based on the job's time-slice end pool value. The current system pool identifier returned by this API will be the actual pool in which the thread currently is running.

Run priority. The priority at which this thread currently is running, relative to other threads on the system. The run priority ranges from 0 (highest priority) to 99 (lowest priority). The value may never be higher than the run priority for the job in which this thread is running. Since this API is intended for retrieving the current value of an attribute, the run priority of the thread is returned, even though the 1802 key represents the run priority of the job on other interfaces. To obtain the run priority of the job, use the 1802 key on the Retrieve Thread Attributes (QWTRTVTA) API.


Error Messages



API introduced: V4R2

[ Back to top | Work Management APIs | APIs by category ]