OUTPUT_QUEUE_ENTRIES table function
The OUTPUT_QUEUE_ENTRIES table function returns one row for each spooled file in an output queue.
Authorization: The caller must have:
- *EXECUTE authority to the output queue library and
- *READ authority to the output queue object, or
- *SPLCTL special authority, or
- *JOBCTL special authority and the output queue is defined with OPRCTL(*YES).
The schema is QSYS2.
- outq-lib
- A character or graphic string expression that identifies the name of the library containing outq-name. If this parameter is blank, the default of *LIBL is used.
- outq-name
- A character or graphic string expression that identifies the name of an output queue.
- detailed-info
- A character or graphic string expression that indicates the type
of information to be returned.
- YES
- All the information available for the output queue is returned.
- NO
- Only the general information is returned for the output queue. This is the information in the columns prior to the ACCOUNTING_CODE column. This is the default.
The result of the function is a table containing rows with the format shown in the following table. All the columns are nullable.
Column Name | Data Type | Description |
---|---|---|
CREATE_TIMESTAMP | TIMESTAMP | The timestamp when the file was created. |
SPOOLED_FILE_NAME | VARCHAR(10) | The file name that was specified by the user program when the file was created, or the name of the device file used to create this file. |
USER_NAME | VARCHAR(10) | The name of the user profile that produced the file. |
USER_DATA | VARCHAR(10) | The user-specified data that describes this file. Contains null if there is no user-specified data. |
STATUS | VARCHAR(15) | Status of the spooled file.
|
SIZE | INTEGER | The size of the spooled file, in kilobytes. |
TOTAL_PAGES | INTEGER | The total number of pages in the file. |
COPIES | SMALLINT | The number of copies remaining to print. |
FORM_TYPE | VARCHAR(10) | The type of form that should be loaded in the printer to print this file. |
JOB_NAME | VARCHAR(28) | The qualified job name that produced the file. |
DEVICE_TYPE | VARCHAR(10) | The type of data stream used to
represent the file.
|
OUTPUT_PRIORITY | SMALLINT | The priority of the spooled file. |
FILE_NUMBER | INTEGER | The spooled file number of the specified file. |
SYSTEM | VARCHAR(8) | The name of the system where the job that created the spooled file ran. |
Values for the following columns are returned when the DETAILED_INFO parameter is YES. Otherwise, the columns will contain the null value. | ||
ACCOUNTING_CODE | VARCHAR(15) | An identifier assigned by the system to record the resources used to write this file. |
EXPIRATION_DATE | DATE | The date the file will be eligible for removal from the system by the Delete Expired Spooled Files (DLTEXPSPLF) command. Contains the null value if the file will not expire. |
SAVE_AFTER_WRITE | VARCHAR(4) | Indicates whether this file is
to be saved after it is written.
|
![]() ![]() |
![]() ![]() |
![]() Contains null if the spooled file data stream is not *AFPDS, *AFPDSLINE, or *LINE, or if the file is open. ![]() |
![]() ![]() |
![]() ![]() |
![]() Contains null if there is no maximum. ![]() |
PAGE_LENGTH | INTEGER | The page length, in lines per page, used by the spooled file. |
LINES_PER_INCH | DECIMAL(5,1) | The number of lines per vertical inch defined in the printer file. |
PAGE_WIDTH | INTEGER | The page width, in characters per printed line, used by the spooled file. |
CHARACTERS_PER_INCH | DECIMAL(5,1) | The number of characters per horizontal inch, defined in the printer file. |
PRINT_FIDELITY | VARCHAR(8) | The kind of error handling that
is performed when printing.
|
PAGE_ROTATION | VARCHAR(5) | The degree of rotation of the text
on the page, with respect to the way the form is loaded into the printer.
|
PRINT_BOTH_SIDES | VARCHAR(7) | How the information prints.
|
FILE_AVAILABLE | VARCHAR(8) | The time when this file becomes
available to an output device for processing.
|
STARTING_PAGE | VARCHAR(10) | The page at which printing is to
start for the file. Can contain the following special value:
|
ENDING_PAGE | VARCHAR(10) | The page at which printing is to
end for the file. Can contain the following special value:
|
DEVICE_FILE_LIBRARY | VARCHAR(10) | The name of the library that contains the device file. |
DEVICE_FILE_NAME | VARCHAR(10) | The name of the device file used to create the spooled file. |
![]() ![]() |
![]() ![]() |
![]() Contains null when there is no user-defined data. ![]() |
PROGRAM_THAT_OPENED_FILE_LIBRARY | VARCHAR(10) | The name of the library that contains the program that opened the file. Contains null when the program is not known. |
PROGRAM_THAT_OPENED_FILE_NAME | VARCHAR(10) | The name of the program that opened the spooled file. Contains null when the program is not known. |
FORM_DEFINITION_LIBRARY | VARCHAR(10) | The name of the library that contains the form definition. Contains null if FORM_DEFINITION_NAME is a special value or if no form definition is specified for this spooled file. |
FORM_DEFINITION_NAME | VARCHAR(10) | The name of the form definition
to use for this print request. Can contain one of the following special
values:
|
PAGE_DEFINITION_LIBRARY | VARCHAR(10) | The name of the library containing the page definition. Contains the null value for *LINE or *AFPDSLINE printer device type files. |
PAGE_DEFINITION_NAME | VARCHAR(10) | The name of the page definition to use for the file. Contains the null value for *LINE or *AFPDSLINE printer device type files. |
FRONT_OVERLAY_LIBRARY | VARCHAR(10) | The name of the library containing
the front overlay. Can contain one of these special values:
|
FRONT_OVERLAY_NAME | VARCHAR(10) | The name of the front overlay.
Can contain the following special value:
|
BACK_OVERLAY_LIBRARY | VARCHAR(10) | The name of the library containing the back overlay. Contains null when BACK_OVERLAY_NAME is a special value. |
BACK_OVERLAY_NAME | VARCHAR(10) | The name of the back overlay. Can
contain the following special values:
|
CHARACTER_SET_LIBRARY | VARCHAR(10) | The name of the library containing
the font character set object. Can contain one of these special values:
|
CHARACTER_SET_NAME | VARCHAR(10) | The name of the font character
set object used to print this file. Can contain the following special
value:
|
CODE_PAGE_LIBRARY | VARCHAR(10) | The name of the library containing
the code page used to print this spooled file. Can contain one of
these special values:
|
CODE_PAGE_NAME | VARCHAR(10) | The name of the code page used to print this spooled file. Contains null when no code page is specified for this spooled file. |
CHARACTER_SET_POINTSIZE | DECIMAL(5,1) | The point size in which this file's characters should be printed. Contains null if the character set does not have a point size. |
CODED_FONT_LIBRARY | VARCHAR(10) | The name of the library containing
the coded font used to print this spooled file. Can contain one of
these special values:
|
CODED_FONT_NAME | VARCHAR(10) | The name of the coded font used
to print this spooled file. Can contain the following special value:
|
CODED_FONT_POINTSIZE | DECIMAL(5,1) | The point size in which this file's characters should be printed. Contains null if the coded font does not have a point size. |
MULTIBYTE_DATA | VARCHAR(10) | Whether the file can contain double-byte character set (DBCS) data, Unicode data, or both. Values are *YES and *NO. |
DBCS_CODED_FONT_LIBRARY | VARCHAR(10) | The name of the library containing
the DBCS-coded font. Can contain one of these special values:
|
DBCS_CODED_FONT_NAME | VARCHAR(10) | The name of the DBCS-coded font
used to print DBCS-coded data on printers configured as AFP(*YES).
Can contain the following special value:
|
DBCS_CODED_FONT_POINTSIZE | DECIMAL(5,1) | The point size in which this file's DCBS characters should be printed. Contains null if the DBCS-coded font does not have a point size. |
Example
Find the 100 largest spool files in the QEZJOBLOG output queue. Since no detailed information is needed, specify NO to avoid the additional processing.
SELECT *
FROM TABLE(QSYS2.OUTPUT_QUEUE_ENTRIES('*LIBL', 'QEZJOBLOG', 'NO')) A
ORDER BY SIZE DESC
FETCH FIRST 100 ROWS ONLY