Open List of Output Queues (QSPOLOTQ) API


  Required Parameter Group:


  Threadsafe: Yes

  Default Public Authority: *USE

The Open List of Output Queues (QSPOLOTQ) API generates a list of output queues on the system. The list can include all output queues on the system, all output queues for a specified library list, all output queues on an ASP device, all output queues with a name starting with the same characters, or a specific output queue. The filtered list can then be sorted depending on the value of the sort parameter. When requesting output queue information, if the signed-on user is not authorized to the library of the output queue, information for that output queue is not returned by this API. Upon successful completion of this API, a handle is returned in the list information parameter. You may use this handle on subsequent calls to the following APIs:


Performance Impacts

Sorting on one or more values of output queue name, output queue library name, number of files on an output queue, number of writers started to an output queue, first writer started to the queue, output queue status, description, or ASP name takes more processing power and time.


Authorities and Locks

Output Queue Library Authority
*EXECUTE
Output Queue Lock
This API gets an *EXCLRD lock on the output queue.

Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The variable used to return the output queue information.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable.

Format of receiver variable
INPUT; CHAR(8)

The format of the output queue information being returned. You can specify the following:


List information
OUTPUT; CHAR(80)

Information about the list created by this program. For a description of the layout of this parameter, see Format of Open list information.

Filter information
INPUT; CHAR(*)

The information in this parameter is used for filtering the list of output queue information. For more information about the filter information, see Filter Information.

Sort information
INPUT; CHAR(*)

Information on what fields within the record of information to sort. See Format of Sort Information for a description of the layout of this parameter. Note that when sorting is requested, the entire list has to be built and sorted before any records can be returned.

Number of records to return
INPUT; BINARY(4)

The number of records in the list to put into the receiver variable.

If -1 is specified for this parameter, the entire list is built synchronously.

If 0 is specified for this parameter, the entire list is built asynchronously in a server job.

If a positive number of records to return is specified, at least that many records are built synchronously and the remainder are built asynchronously in a server job.

Error code
I/O; CHAR(*)

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


Filter Information

The following table shows the format of the filter information parameter. For detailed descriptions of the fields in the table, see Field Descriptions.



Format of Sort Information

For more details about the fields in the following table, see Field Descriptions.

Note: If the last three fields (sort key field data type, sort order, and the reserved field) are not used, then they must be set to hexadecimal zeros. This causes all the data to be treated as character data, and it is sorted in ascending order.


Field Descriptions

Auxiliary storage pool (ASP) device name. The name of an ASP device in which storage is allocated for the library that contains the output queue. A specific ASP device name or a special value may be specified. If filtering on an output queue library value of *CURLIB, *LIBL, or *USRLIBL, the ASP device name must not be specified or must be the special value * or message CPF2173 will be issued.

Output queue name. The output queue about which to retrieve information. A specific output queue name, a generic output queue name, or the special value *ALL may be specified.

Output queue library name. The library in which the output queue is located. A specific library name or a special value may be specified.

Length of filter information. The length of the filter information. An error message is returned if the length of filter information is not set correctly.

Number of keys to sort on. The number of fields within the record structure on which to sort. If 0 is specified, the list is not sorted.

Reserved. Must be set to hexadecimal zeros.

Sort key field data type. Data type of field to sort. See Sort (QLGSORT) API for information on the list of data types available.

Sort key field length. The length of the field on which to sort.

Sort key field starting position. Within the record of information, the starting position of the field on which to sort.

Sort order. Whether the list should be sorted in ascending or descending order according to the key. See Sort (QLGSORT) API for information on the sort order special values.


Format of Receiver Variable

The following tables describe the order and format of the data returned in the receiver variable.

OOTQ0100 Format

For more details about the fields in the following table, see Field Descriptions.



Field Descriptions

Description. The text description for this output queue. The following special value may be returned:

Name of first writer started to output queue. The first active writer producing output from the output queue.

Output queue library auxiliary storage pool (ASP) name. The name of the auxiliary storage pool (ASP) device name where storage is allocated for the library that contains the object. The following special values may be returned:

Output queue library name. The name of the library in which the output queue is located.

Output queue name. The name of the output queue.

Output queue status. The current status of the output queue. The possible values are:

Number of spooled files on output queue. The total number of spooled files currently on this output queue. This field is -1 if the output queue is damaged.

Number of writers started to output queue. The total number of writers currently producing output from this output queue. This field is -1 if the output queue is damaged.

Reserved. A reserved field.


Error Messages



API introduced: V6R1 with PTF

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