Add Job Queue Entry (ADDJOBQE)

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

The Add Job Queue Entry (ADDJOBQE) command adds a job queue entry to the specified subsystem description. A job queue entry identifies a job queue from which jobs are selected for running in the subsystem. Jobs can be placed on a job queue by spooling readers or by using the following commands:

Jobs started from a job queue are batch jobs (except for interactive jobs that use the TFRJOB command). In a subsystem, job queues with lower sequence numbers are processed first. For more information, refer to the Sequence number (SEQNBR) parameter.

Notes:

  1. The job associated with an active subsystem can only find objects that exist in the system auxiliary storage pool (ASP) or in a basic user ASP. Therefore, objects that are referenced by this command should exist in the system ASP or in a basic user ASP.

Restrictions:

  1. To use this command, you must have:
    • object operational (*OBJOPR), object management (*OBJMGT), and read (*READ) authority to the specified subsystem description and execute (*EXECUTE) authority to the library containing that subsystem description.
Top

Parameters

Keyword Description Choices Notes
SBSD Subsystem description Qualified object name Required, Positional 1
Qualifier 1: Subsystem description Name
Qualifier 2: Library Name, *LIBL, *CURLIB
JOBQ Job queue Qualified object name Required, Positional 2
Qualifier 1: Job queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB
MAXACT Maximum active jobs 0-1000, 1, *NOMAX Optional
SEQNBR Sequence number 1-9999, 10 Optional
MAXPTY1 Max active priority 1 0-99, *NOMAX Optional
MAXPTY2 Max active priority 2 0-99, *NOMAX Optional
MAXPTY3 Max active priority 3 0-99, *NOMAX Optional
MAXPTY4 Max active priority 4 0-99, *NOMAX Optional
MAXPTY5 Max active priority 5 0-99, *NOMAX Optional
MAXPTY6 Max active priority 6 0-99, *NOMAX Optional
MAXPTY7 Max active priority 7 0-99, *NOMAX Optional
MAXPTY8 Max active priority 8 0-99, *NOMAX Optional
MAXPTY9 Max active priority 9 0-99, *NOMAX Optional
Top

Subsystem description (SBSD)

Specifies the name and library of the subsystem description to which the job queue entry is added.

This is a required parameter.

Qualifier 1: Subsystem description

name
Specify the name of the subsystem description where the job queue entry is being added.

Note: The following IBM-supplied objects are not valid on this parameter:

  • QSYSSBSD

Qualifier 2: Library

*LIBL
All libraries in the thread's library list are searched until a match is found.
*CURLIB
The current library for the thread is used to locate the object. If no library is specified as the current library for the thread, the QGPL library is used.
name
Specify the library where the subsystem description is located.
Top

Job queue (JOBQ)

Specifies the name and library of the job queue that is a source of batch jobs that are started by the subsystem. If the job queue does not exist when the entry is added or changed, a library qualifier other than *LIBL must be specified because the job queue name is kept in the subsystem description.

This is a required parameter.

Qualifier 1: Job queue

name
Specifies the name of the job queue that is a source of batch jobs that are started by the subsystem.

Qualifier 2: Library

*LIBL
All libraries in the thread's library list are searched until a match is found.
*CURLIB
The current library for the thread is used to locate the object. If no library is specified as the current library for the thread, the QGPL library is used.
name
Specify the library where the job queue is located.
Top

Maximum active jobs (MAXACT)

Specifies the maximum number of jobs that can be active at the same time from this job queue.

1
Only one job from the job queue can be active at any time.
*NOMAX
There is no maximum for the number of jobs that can be started at the same time through this job queue entry. However, the maximum activity level of the routing entries, the subsystem, or the specific job priority level might prevent jobs from being started. If *NOMAX is specified, all the jobs on the job queue are started, even though the activity level of the storage pool being used might prohibit them from running at the same time.
0-1000
Specify the maximum number of jobs that can be active at the same time from this job queue.
Top

Sequence number (SEQNBR)

Specifies a sequence number for this job queue, which is used by the subsystem to determine the order in which the job queues are processed.

The subsystem first selects jobs from the job queue with the lowest sequence number. When all jobs on that queue have been processed or the number of jobs specified on the Maximum active jobs (MAXACT) parameter has been reached, the subsystem processes jobs on the queue with the next higher sequence number. This sequence continues until all job queue entries have been processed, or until the subsystem has reached its limit for overall maximum jobs. In some cases, the sequence is interrupted and the subsystem processes a job queue with a lower sequence number. This occurs for this subsystem when one of the following conditions occurs:

10
A sequence number of 10 is assigned to this job queue.
1-9999
Specify the sequence number assigned to this job queue. The sequence number must be unique in the subsystem description.
Top

Max active priority 1 (MAXPTY1)

Specifies the number of jobs that can be started for a specified job priority level.

*NOMAX
The number of jobs started in a specific priority level is not limited.
0-99
Specify the number of jobs started in a specific priority level. A value of 0 indicates that no jobs are started from a specific priority level.
Top

Max active priority 2 (MAXPTY2)

Specifies the number of jobs that can be started for a specified job priority level.

*NOMAX
The number of jobs started in a specific priority level is not limited.
0-99
Specify the number of jobs started in a specific priority level. A value of 0 indicates that no jobs are started from a specific priority level.
Top

Max active priority 3 (MAXPTY3)

Specifies the number of jobs that can be started for a specified job priority level.

*NOMAX
The number of jobs started in a specific priority level is not limited.
0-99
Specify the number of jobs started in a specific priority level. A value of 0 indicates that no jobs are started from a specific priority level.
Top

Max active priority 4 (MAXPTY4)

Specifies the number of jobs that can be started for a specified job priority level.

*NOMAX
The number of jobs started in a specific priority level is not limited.
0-99
Specify the number of jobs started in a specific priority level. A value of 0 indicates that no jobs are started from a specific priority level.
Top

Max active priority 5 (MAXPTY5)

Specifies the number of jobs that can be started for a specified job priority level.

*NOMAX
The number of jobs started in a specific priority level is not limited.
0-99
Specify the number of jobs started in a specific priority level. A value of 0 indicates that no jobs are started from a specific priority level.
Top

Max active priority 6 (MAXPTY6)

Specifies the number of jobs that can be started for a specified job priority level.

*NOMAX
The number of jobs started in a specific priority level is not limited.
0-99
Specify the number of jobs started in a specific priority level. A value of 0 indicates that no jobs are started from a specific priority level.
Top

Max active priority 7 (MAXPTY7)

Specifies the number of jobs that can be started for a specified job priority level.

*NOMAX
The number of jobs started in a specific priority level is not limited.
0-99
Specify the number of jobs started in a specific priority level. A value of 0 indicates that no jobs are started from a specific priority level.
Top

Max active priority 8 (MAXPTY8)

Specifies the number of jobs that can be started for a specified job priority level.

*NOMAX
The number of jobs started in a specific priority level is not limited.
0-99
Specify the number of jobs started in a specific priority level. A value of 0 indicates that no jobs are started from a specific priority level.
Top

Max active priority 9 (MAXPTY9)

Specifies the number of jobs that can be started for a specified job priority level.

*NOMAX
The number of jobs started in a specific priority level is not limited.
0-99
Specify the number of jobs started in a specific priority level. A value of 0 indicates that no jobs are started from a specific priority level.
Top

Examples

Example 1: Adding a Job Queue

ADDJOBQE   SBSD(QGPL/NIGHTSBS)  JOBQ(QGPL/NIGHT)  MAXACT(3)

This command adds a job queue entry for the NIGHT job queue (in the QGPL library) to the NIGHTSBS subsystem description contained in the QGPL library. The entry specifies that up to three batch jobs from the NIGHT job queue can be active at the same time in the subsystem. The default sequence number of 10 is assumed.

Example 2: Running Jobs in Specific Priority Levels

ADDJOBQE   SBSD(QBASE)  JOBQ(JOBQ1)  MAXPTY1(2)  MAXPTY7(0)
           MAXPTY8(0)  MAXPTY9(0) SEQNBR(99)

This command adds a job queue entry for the JOBQ1 job queue to the QBASE subsystem description. The sequence number for this job queue is set to 99. The priority levels specified prevent any jobs with priority levels 7 through 9 from running.

Top

Error messages

*ESCAPE Messages

CPF1619
Subsystem description &1 in library &2 damaged.
CPF1691
Active subsystem description may or may not have changed.
CPF1697
Subsystem description &1 not changed.
Top