WRKJOBQ (Work with Job Queues)

WRKJOBQ Command syntax diagram

 

Purpose

The Work with Job Queues (WRKJOBQ) command allows the user to work with either 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.

 

Optional Parameters

JOBQ
Specifies that all job queues are shown, or specifies the qualified name of the job queue whose status is shown.

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.

*ALL: The overall status of all job queues is shown.

The name of the job queue can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list are searched until the first match is found.

*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

*ALL: All libraries in the system, including QSYS, are searched.

library-name: Specify the name of the library to be 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.

job-queue-name: Specify the name of the job queue for which detailed status information is shown.

OUTPUT
Specifies whether the output from the command is shown at the requesting work station or printed with the job's spooled output. More information on this parameter is in commonly used parameters.

*: Output requested by an interactive job is shown on the display. Output requested by a batch job is printed with the job's spooled output.

*PRINT: The output is printed with the job's spooled output.

Examples for WRKJOBQ

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.

Error messages for WRKJOBQ

*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.
CPF2443
Job log not displayed or listed because job has ended.
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.