Job queues

 

A job queue contains an ordered list of jobs waiting to be processed by a subsystem. The job queue is the first place that a submitted batch job goes before becoming active in a subsystem. The job is held here until a number of factors are met.

In order for jobs on a job queue to be processed, there must be an active subsystem that is accepting work from that job queue. When a subsystem starts, it attempts to allocate the job queues that it is configured to accept work from, and it must successfully allocate a job queue in order to process jobs from that job queue. Therefore, while one subsystem can process jobs from multiple job queues, only one subsystem can process jobs from a particular job queue at a time.

Subsystems select jobs from job queues in priority order, within limits that can be configured for each priority. Each job has a job queue priority that can be managed when the job is on the job queue through job properties. A base set of job queues is provided with your system. In addition, you can create additional job queues that you need.

APIs, such as Open List of Job Queues (QSPOLJBQ) and Retrieve Job Queue Information (QSPRJOBQ), can be called to get information about job queues.

  • Ordered list
    The ordered list refers to the order in which jobs appear on the job queue. The availability, priority, and the date and time values help determine the order of jobs on the job queue.

  • How a job queue works
    Job queues are allocated by a subsystem via the job queue entry. Jobs can be placed on a job queue even if the subsystem has not been started. When the subsystem is started, it processes the jobs on the queue.

  • How jobs are taken from a job queue
    Different factors determine how the jobs are selected from a job queue and started.

  • Job queue entry
    A job queue entry identifies a job queue from which jobs are selected for running in the subsystem. There are five parameters in the job queue entry that control how the job queue should be handled.

  • How job queues are allocated to a subsystem
    A job queue can be associated with several subsystems but it can only be allocated to one subsystem at a time. When the subsystem is started, the subsystem monitor tries to allocate each job queue defined in the subsystem job queue entries.

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

  • How jobs are taken from multiple job queues
    A subsystem processes jobs from a job queue based on sequence number. A subsystem can have more than one job queue entry and can therefore allocate more than one job queue.

  • Job queue security
    You can maintain a level of security with your job queue by authorizing only certain persons (user profiles) to that job queue. In general, there are three ways that a user can become authorized to control a job queue (for example, hold or release the job queue).

 

Parent topic:

Concepts

Related concepts
Managing job queues