Job Priority
Job Priority is a numerical value assigned to a batch job that determines its execution precedence and resource allocation within the z/OS Job Entry Subsystem (JES) environment. It dictates which jobs are selected from the input queue for execution when system resources, such as initiators, become available.
Key Characteristics
-
- Numerical Scale: Typically represented by a value ranging from 0 to 15 (or 0 to 255 on some systems), where a higher number generally indicates a higher priority.
- JES Control: Managed and enforced by the Job Entry Subsystem (JES2 or JES3), which uses priority to order jobs within its queues.
- Resource Contention Resolution: When multiple jobs are eligible to run but resources are limited, the job with the highest priority is selected first.
- Dynamic Adjustment: Job priority can be altered by system operators using JES commands (e.g.,
$P JQ) or by automated scheduling software during a job's lifecycle. - Job Class Association: Often, a default job priority is associated with a specific
JOB CLASS, which can then be overridden at the individual job level via theJOBstatement in JCL. - No Direct CPU Dispatching Priority: While it influences *when* a job starts, it does not directly control the CPU dispatching priority of the address space once the job is running; that is managed by
WLM.
Use Cases
-
- Critical Production Batch: Assigning the highest priority to essential production jobs (e.g., end-of-day processing, financial settlements) to ensure their timely completion.
- Ad-hoc Reporting: Giving lower priority to non-critical, user-initiated reports to prevent them from impacting core business processes.
- Development and Testing: Setting medium to low priorities for development and test jobs to allow production work to proceed unimpeded.
- System Utilities: Running system maintenance utilities (e.g., backups, reorganizations) at specific, often lower, priorities during off-peak hours.
- Long-Running Processes: Initially submitting long-running jobs with a lower priority and elevating it if they become critical or fall behind schedule.
Related Concepts
Job Priority is fundamentally linked to JES (Job Entry Subsystem), which uses it to manage the flow and execution order of batch jobs. It works in conjunction with JOB CLASS, as classes often define default priorities, and jobs must wait for an available initiator of their assigned class. While Workload Manager (WLM) manages the dispatching priority of *active* address spaces, Job Priority primarily governs the *queueing* and *selection* of batch jobs for execution by JES.
- Establish a Standardized Priority Scheme: Define clear organizational guidelines for assigning priorities based on job criticality, service level agreements (SLAs), and resource consumption.
- Monitor JES Queues Regularly: Use JES display commands (e.g.,
$D JQ) to monitor job queues for bottlenecks or jobs stuck due to inappropriately low priorities. - Avoid Overuse of High Priorities: Reserve the highest priorities for truly critical jobs to prevent system imbalance and ensure that critical work genuinely receives preferential treatment.
- Automate Priority Adjustments: Leverage scheduling tools or
JESexits to dynamically adjust job priorities based on time of day, system load, or dependencies on other jobs. - Educate Developers and Users: Ensure that those submitting jobs understand the impact of priority settings on job turnaround time and overall system performance.