Multiple job queues

 

In many cases, using QBATCH as the only job queue with the default of one active job will be adequate for your needs. If this is not adequate, you might want to have multiple job queues so that some job queues are active during normal working hours, some are for special purposes, and some are active after normal working hours.

For example, you can designate different job queues for:

Long-running jobs so you can control how many jobs are active at the same time

You might also want these jobs to use a lower priority than the other batch jobs.

Overnight jobs that are inconvenient to run during normal working hours

For example, to run a Reorganize Physical File Member (RGZPFM) command on a large database file requires an exclusive lock on the file. This means that other users cannot access the file while this operation is taking place. Additionally, this operation can take a long time. It can be more efficient to place this job on a job queue for jobs which run during off-shift hours.

High-priority jobs

You might want to have a job queue to which all high-priority work is sent. You can then ensure that this work is completed rapidly and is not delayed by lower-priority jobs.

Jobs that are directed to particular resource requirement such as diskette or tape

Such a job queue needs a MAXACT parameter of 1 in the job queue entry of the subsystem description so that only one job at a time uses the resource.

For example, if a tape is used for several jobs, all jobs using tape are be placed on a single job queue. One job at a time are then selected from the job queue. This ensures that no two jobs compete for the same device at the same time. If this happens, one of the jobs ends with an allocation error.

Tape output cannot be spooled.

Programmer work

You might want to have a job queue to handle programmer work or types of work that can be held while production work is being run.

Sequential running of a series of jobs

You can have an application in which one job is dependent on the completion of another job. If you place these jobs on a job queue that selects and runs one job at a time, this ensures the running sequence of these jobs.

If a job requires exclusive control of a file, you might want to place it on a job queue when the queue is the only one active on the server, such as during the night or on a weekend.

If you use multiple job queues, you will find that control of the various job queues is a main consideration. You will typically want to control:

 

Parent topic:

Job queues

Related concepts
Ordered list How a job queue works How jobs are taken from a job queue Job queue entry How job queues are allocated to a subsystem How jobs are taken from multiple job queues Job queue security