ADDJOBQE (Add Job Queue Entry)

ADDJOBQE Command syntax diagram

 

Purpose

The Add Job Queue Entry (ADDJOBQE) command adds a job queue entry to the specified subsystem description. A job queue entry identifies the 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:

In a subsystem, job queues with lower sequence numbers are processed first. For more information, refer to the description of the SEQNBR parameter.

Restriction: To use this command, the user must have object operational and object management authorities for the specified job queue. The specified job queue must already exist in the system if the library qualifier is not given. A job queue is created by the Create Job Queue (CRTJOBQ) command.

 

Required Parameters

SBSD
Specifies the qualified name of the subsystem description to which the job queue entry is added.

The name of the subsystem description 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.

library-name: Specify the name of the library to be searched.

subsystem-description-name: Specify the name of the subsystem description.

JOBQ
Specifies the qualified name 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, a library qualifier must be specified because the job queue name is retained in the subsystem description.

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.

library-name: Specify the name of the library to be searched.

job-queue-name: Specify the name of the job queue.

 

Optional Parameters

MAXACT
Specifies the maximum number of jobs that can be active at the same time from this job queue. More information on this parameter is in Commonly used parameters.

1: Only one job from the job queue can be active at any one time. However, the maximum activity level of the routing entries might prevent routing steps from being started. If *NOMAX is specified, all the jobs on the job queue are started (within the limit specified by the MAXJOBS parameter in the subsystem description), even though the activity level of the storage pool being used might prohibit them from running at the same time.

*NOMAX: There is no maximum number of jobs that can be active at the same time.

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

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

*NOMAX: There is no disconnect limit.

0: No jobs are started from a specified priority level.

number-of-jobs: Specify the number of jobs started in a specified priority level. Valid values range from 1 through 99.

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

10: A sequence number of 10 is assigned to this job queue.

sequence-number: Specify the sequence number assigned to the job queue. The sequence number must be unique in the subsystem description. Valid values range from 1 through 9999.

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 MAXACT parameter has been reached, the subsystem processes jobs on the queue with the next higher sequence number. This process continues until all job queue entries have been processed or until the subsystem has reached its limit for overall maximum jobs (as specified on the MAXJOBS parameter in the subsystem description). In some cases, the sequence is interrupted and the subsystem processes a queue with a lower sequence number. This occurs for this subsystem when one of the following conditions occurs:

  • A held job or job queue is released.
  • A job is placed on or transferred to a queue.
  • A new queue is allocated.
  • A job ends.

Examples for ADDJOBQE

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)

This command controls the selection of jobs for the job queue named JOBQ1 by setting priority levels to the values specified. This prevents any jobs with priority levels 7 through 9 from running.

Error messages for ADDJOBQE

*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.