JOB_QUEUE_INFO view

The JOB_QUEUE_INFO view returns one row for each job queue.

The values returned for the columns in the view are similar to the values returned by the Work with Job Queue (WRKJOBQ) CL command and the Retrieve Job Queue Information (QSPRJOBQ) API.

Authorization: Rows will be returned for job queues when the caller has:
  • Execute authority to the job queue library and
    • Read authority to the job queue, or
    • *JOBCTL special authority and the job queue has OPRCTL(*YES), or
    • *SPLCTL special authority

The following table describes the columns in the view. The system name is JOBQ_INFO. The schema is QSYS2.

Table 1. JOB_QUEUE_INFO view
Column Name System Column Name Data Type Description
JOB_QUEUE_NAME JOBQ VARCHAR(10) The name of the job queue.
JOB_QUEUE_LIBRARY JOBQ_LIB VARCHAR(10) The name of the library that contains the job queue.
JOB_QUEUE_STATUS STATUS VARCHAR(8) The status of the job queue.
HELD
The queue is held.
RELEASED
The queue is released.
NUMBER_OF_JOBS JOBS INTEGER The number of jobs in the queue.
SUBSYSTEM_NAME SUB_NAME
VARCHAR(10)
Nullable
The name of the subsystem that can receive jobs from this job queue.

Contains the null value if this job queue is not associated with an active subsystem.

SUBSYSTEM_LIBRARY_NAME SUBLIB_NAM
VARCHAR(10)
Nullable
The library in which the subsystem description resides.

Contains the null value if this job queue is not associated with an active subsystem.

SEQUENCE_NUMBER SEQNO
INTEGER
Nullable
The job queue entry sequence number. The subsystem uses this number to determine the order in which job queues are processed. Jobs from the queue with the lowest sequence number are processed first.

Contains the null value if this job queue is not associated with an active subsystem.

MAXIMUM_ACTIVE_JOBS MAX_JOBS
INTEGER
Nullable
The maximum number of jobs that can be active at the same time through this job queue entry. A value of -1 indicates *NOMAX, no maximum number of jobs is defined.

Contains the null value if this job queue is not associated with an active subsystem.

ACTIVE_JOBS ACT_JOBS
INTEGER
Nullable
The current number of jobs that are active that came through this job queue entry.

Contains the null value if this job queue is not associated with an active subsystem.

HELD_JOBS HELD_JOBS INTEGER The current number of jobs that are in *HELD status. This is the sum of the 10 HELD_JOBS_PRIORITY_n columns.
RELEASED_JOBS RLS_JOBS INTEGER The current number of jobs that are in *RELEASED status. This is the sum of the 10 RELEASED_JOBS_PRIORITY_n columns.
SCHEDULED_JOBS SCHED_JOBS INTEGER The current number of jobs that are in *SCHEDULED status. This is the sum of the 10 SCHEDULED_JOBS_PRIORITY_n columns.
TEXT_DESCRIPTION TEXT
VARCHAR(50)
Nullable
Text that describes the job queue.

Contains the null value if there is no text description for the job queue.

OPERATOR_CONTROLLED OPR_CTRL VARCHAR(4) Whether users with job control authority are allowed to control this job queue and manage the jobs on the queue. Users have job control authority if SPCAUT(*JOBCTL) is specified in their user profile.
*NO
This queue and its jobs cannot be controlled by users with job control authority unless they also have other special authority.
*YES
Users with job control authority can control the queue and manage the jobs on the queue.
AUTHORITY_TO_CHECK ALL_AUTH VARCHAR(7) Whether the user must be the owner of the queue in order to control the queue by holding or releasing the queue.
*DTAAUT
Any user with *READ, *ADD, or *DELETE authority to the job queue can control the queue.
*OWNER
Only the owner of the job queue can control the queue.
MAXIMUM_ACTIVE_JOBS_
  PRIORITY_1
MAXIMUM1
INTEGER
Nullable
The maximum number of priority 1 jobs that can be active at the same time. A value of -1 indicates *NOMAX, no maximum number of jobs.

Contains the null value if this job queue is not associated with an active subsystem.

MAXIMUM_ACTIVE_JOBS_
  PRIORITY_2
MAXIMUM2
INTEGER
Nullable
The maximum number of priority 2 jobs that can be active at the same time. A value of -1 indicates *NOMAX, no maximum number of jobs.

Contains the null value if this job queue is not associated with an active subsystem.

MAXIMUM_ACTIVE_JOBS_
  PRIORITY_3
MAXIMUM3
INTEGER
Nullable
The maximum number of priority 3 jobs that can be active at the same time. A value of -1 indicates *NOMAX, no maximum number of jobs.

Contains the null value if this job queue is not associated with an active subsystem.

MAXIMUM_ACTIVE_JOBS_
  PRIORITY_4
MAXIMUM4
INTEGER
Nullable
The maximum number of priority 4 jobs that can be active at the same time. A value of -1 indicates *NOMAX, no maximum number of jobs.

Contains the null value if this job queue is not associated with an active subsystem.

MAXIMUM_ACTIVE_JOBS_
  PRIORITY_5
MAXIMUM5
INTEGER
Nullable
The maximum number of priority 5 jobs that can be active at the same time. A value of -1 indicates *NOMAX, no maximum number of jobs.

Contains the null value if this job queue is not associated with an active subsystem.

MAXIMUM_ACTIVE_JOBS_
  PRIORITY_6
MAXIMUM6
INTEGER
Nullable
The maximum number of priority 6 jobs that can be active at the same time. A value of -1 indicates *NOMAX, no maximum number of jobs.

Contains the null value if this job queue is not associated with an active subsystem.

MAXIMUM_ACTIVE_JOBS_
  PRIORITY_7
MAXIMUM7
INTEGER
Nullable
The maximum number of priority 7 jobs that can be active at the same time. A value of -1 indicates *NOMAX, no maximum number of jobs.

Contains the null value if this job queue is not associated with an active subsystem.

MAXIMUM_ACTIVE_JOBS_
  PRIORITY_8
MAXIMUM8
INTEGER
Nullable
The maximum number of priority 8 jobs that can be active at the same time. A value of -1 indicates *NOMAX, no maximum number of jobs.

Contains the null value if this job queue is not associated with an active subsystem.

MAXIMUM_ACTIVE_JOBS_
  PRIORITY_9
MAXIMUM9
INTEGER
Nullable
The maximum number of priority 9 jobs that can be active at the same time. A value of -1 indicates *NOMAX, no maximum number of jobs.

Contains the null value if this job queue is not associated with an active subsystem.

ACTIVE_JOBS_PRIORITY_0 ACTIVE0
INTEGER
Nullable
The number of priority 0 jobs that are active.

Contains the null value if this job queue is not associated with an active subsystem.

ACTIVE_JOBS_PRIORITY_1 ACTIVE1
INTEGER
Nullable
The number of priority 1 jobs that are active.

Contains the null value if this job queue is not associated with an active subsystem.

ACTIVE_JOBS_PRIORITY_2 ACTIVE2
INTEGER
Nullable
The number of priority 2 jobs that are active.

Contains the null value if this job queue is not associated with an active subsystem.

ACTIVE_JOBS_PRIORITY_3 ACTIVE3
INTEGER
Nullable
The number of priority 3 jobs that are active.

Contains the null value if this job queue is not associated with an active subsystem.

ACTIVE_JOBS_PRIORITY_4 ACTIVE4
INTEGER
Nullable
The number of priority 4 jobs that are active.

Contains the null value if this job queue is not associated with an active subsystem.

ACTIVE_JOBS_PRIORITY_5 ACTIVE5
INTEGER
Nullable
The number of priority 5 jobs that are active.

Contains the null value if this job queue is not associated with an active subsystem.

ACTIVE_JOBS_PRIORITY_6 ACTIVE6
INTEGER
Nullable
The number of priority 6 jobs that are active.

Contains the null value if this job queue is not associated with an active subsystem.

ACTIVE_JOBS_PRIORITY_7 ACTIVE7
INTEGER
Nullable
The number of priority 7 jobs that are active.

Contains the null value if this job queue is not associated with an active subsystem.

ACTIVE_JOBS_PRIORITY_8 ACTIVE8
INTEGER
Nullable
The number of priority 8 jobs that are active.

Contains the null value if this job queue is not associated with an active subsystem.

ACTIVE_JOBS_PRIORITY_9 ACTIVE9
INTEGER
Nullable
The number of priority 9 jobs that are active.

Contains the null value if this job queue is not associated with an active subsystem.

RELEASED_JOBS_PRIORITY_0 RELEASED0 INTEGER The number of priority 0 jobs currently sitting on the job queue in *RELEASED status.
RELEASED_JOBS_PRIORITY_1 RELEASED1 INTEGER The number of priority 1 jobs currently sitting on the job queue in *RELEASED status.
RELEASED_JOBS_PRIORITY_2 RELEASED2 INTEGER The number of priority 2 jobs currently sitting on the job queue in *RELEASED status.
RELEASED_JOBS_PRIORITY_3 RELEASED3 INTEGER The number of priority 3 jobs currently sitting on the job queue in *RELEASED status.
RELEASED_JOBS_PRIORITY_4 RELEASED4 INTEGER The number of priority 4 jobs currently sitting on the job queue in *RELEASED status.
RELEASED_JOBS_PRIORITY_5 RELEASED5 INTEGER The number of priority 5 jobs currently sitting on the job queue in *RELEASED status.
RELEASED_JOBS_PRIORITY_6 RELEASED6 INTEGER The number of priority 6 jobs currently sitting on the job queue in *RELEASED status.
RELEASED_JOBS_PRIORITY_7 RELEASED7 INTEGER The number of priority 7 jobs currently sitting on the job queue in *RELEASED status.
RELEASED_JOBS_PRIORITY_8 RELEASED8 INTEGER The number of priority 8 jobs currently sitting on the job queue in *RELEASED status.
RELEASED_JOBS_PRIORITY_9 RELEASED9 INTEGER The number of priority 9 jobs currently sitting on the job queue in *RELEASED status.
SCHEDULED_JOBS_PRIORITY_0 SCHEDULED0 INTEGER The number of priority 0 jobs currently sitting on the job queue in *SCHEDULED status.
SCHEDULED_JOBS_PRIORITY_1 SCHEDULED1 INTEGER The number of priority 1 jobs currently sitting on the job queue in *SCHEDULED status.
SCHEDULED_JOBS_PRIORITY_2 SCHEDULED2 INTEGER The number of priority 2 jobs currently sitting on the job queue in *SCHEDULED status.
SCHEDULED_JOBS_PRIORITY_3 SCHEDULED3 INTEGER The number of priority 3 jobs currently sitting on the job queue in *SCHEDULED status.
SCHEDULED_JOBS_PRIORITY_4 SCHEDULED4 INTEGER The number of priority 4 jobs currently sitting on the job queue in *SCHEDULED status.
SCHEDULED_JOBS_PRIORITY_5 SCHEDULED5 INTEGER The number of priority 5 jobs currently sitting on the job queue in *SCHEDULED status.
SCHEDULED_JOBS_PRIORITY_6 SCHEDULED6 INTEGER The number of priority 6 jobs currently sitting on the job queue in *SCHEDULED status.
SCHEDULED_JOBS_PRIORITY_7 SCHEDULED7 INTEGER The number of priority 7 jobs currently sitting on the job queue in *SCHEDULED status.
SCHEDULED_JOBS_PRIORITY_8 SCHEDULED8 INTEGER The number of priority 8 jobs currently sitting on the job queue in *SCHEDULED status.
SCHEDULED_JOBS_PRIORITY_9 SCHEDULED9 INTEGER The number of priority 9 jobs currently sitting on the job queue in *SCHEDULED status.
HELD_JOBS_PRIORITY_0 HELD0 INTEGER The number of priority 0 jobs currently sitting on the job queue in *HELD status.
HELD_JOBS_PRIORITY_1 HELD1 INTEGER The number of priority 1 jobs currently sitting on the job queue in *HELD status.
HELD_JOBS_PRIORITY_2 HELD2 INTEGER The number of priority 2 jobs currently sitting on the job queue in *HELD status.
HELD_JOBS_PRIORITY_3 HELD3 INTEGER The number of priority 3 jobs currently sitting on the job queue in *HELD status.
HELD_JOBS_PRIORITY_4 HELD4 INTEGER The number of priority 4 jobs currently sitting on the job queue in *HELD status.
HELD_JOBS_PRIORITY_5 HELD5 INTEGER The number of priority 5 jobs currently sitting on the job queue in *HELD status.
HELD_JOBS_PRIORITY_6 HELD6 INTEGER The number of priority 6 jobs currently sitting on the job queue in *HELD status.
HELD_JOBS_PRIORITY_7 HELD7 INTEGER The number of priority 7 jobs currently sitting on the job queue in *HELD status.
HELD_JOBS_PRIORITY_8 HELD8 INTEGER The number of priority 8 jobs currently sitting on the job queue in *HELD status.
HELD_JOBS_PRIORITY_9 HELD9 INTEGER The number of priority 9 jobs currently sitting on the job queue in *HELD status.

Example

  • Examine the job queues with the largest number of active jobs
    SELECT * FROM QSYS2.JOB_QUEUE_INFO
      WHERE ACTIVE_JOBS IS NOT NULL
      ORDER BY NUMBER_OF_JOBS DESC;