Work with Job Queue (WRKJOBQ)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Work with Job Queues (WRKJOBQ) command shows the overall status of all job queues or the detailed status of a specific job queue. Also, this command allows the user to work with the overall status of all job queues that match the qualified generic name specified. The status of the queues may change while the command is being run.

Top

Parameters

Keyword Description Choices Notes
JOBQ Job queue Single values: *ALL
Other values: Qualified object name
Optional, Positional 1
Qualifier 1: Job queue Generic name, name
Qualifier 2: Library Name, *LIBL, *CURLIB, *ALL
OUTPUT Output *, *PRINT Optional, Positional 2
Top

Job queue (JOBQ)

Specifies that all job queues are to be displayed, or specifies the job queue whose status is to be displayed.

Note: When a generic job queue name is specified and qualified with a library name, the overall status of all the job queues that match the generic name is shown even if there is only one job queue that matches the generic name.

Single values

*ALL
Status of all job queues is displayed with information about each job queue. If *ALL is specified, no value can be specified for a library name because *ALL provides a list of all job queues in every library on the system.

Qualifier 1: Job queue

generic-name
Specify the generic name of the job queues for which detailed status information are displayed. A list of all jobs on the job queue is displayed with information about each job.
name
Specify the name of the job queue for which detailed status information is displayed. A list of all jobs on the job queue is displayed with information about each job.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched.
*ALL
All libraries in the system, including QSYS, are searched.

Note: When *ALL is specified for the library, the overall status of the job queues is shown even if only one job queue is found.

name
Specify the name of the library where the job queue is located.
Top

Output (OUTPUT)

Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output.

*
If the request is made by a work station user, the output is displayed. If the request is from a batch job, the output is printed.
*PRINT
The output is printed with the job's spooled output.
Top

Examples

Example 1: Displaying Status Information of a Specific Job Queue

WRKJOBQ   JOBQ(QGPL/QBATCH)

This command shows the detailed status information about the job queue named QBATCH in the QGPL library. Each job on the QBATCH job queue is identified by job name, user name, and job number; the job's priority and status are also shown.

Example 2: Searching for Job Queues Using a Generic Name

WRKJOBQ   JOBQ(QGPL/QBAT*)

This command allows the user to show and work with the overall status information of the job queues whose names start with 'QBAT' and exist in the QGPL library.

Top

Error messages

*ESCAPE Messages

CPF2207
Not authorized to use object &1 in library &3 type *&2.
CPF3302
Override of print file &1 to file &2 not valid.
CPF3307
Job queue &1 in &2 not found.
CPF3330
Necessary resource not available.
CPF7D41
Error occurred while logging order assistance request.
CPF7D42
Error occurred while performing database operation.
CPF9845
Error occurred while opening file &1.
CPF9846
Error while processing file &1 in library &2.
CPF9871
Error occurred while processing.
Top