IBM i Global

 View Only

LinkedIn Share on LinkedIn

IBM i Job Management: Subsystems, Jobs, and Work Management Explained

By Gaurav Khanna posted Tue March 18, 2025 04:57 AM

  

Introduction

IBM i is designed to handle multiple processes efficiently through its job management and work management system. IBM i uses subsystems, jobs, and job queues to manage workloads dynamically. This guide introduces the basics of IBM i job management, helping beginners understand how processes are handled and controlled.

1. Understanding Jobs in IBM i

A job in IBM i is a unit of work that the system processes. It can be a user session, a background task, or a system function.

Types of Jobs:

Job Type

Description

Interactive Job

A job initiated by a user signing in via a terminal (e.g., a 5250 session).

Batch Job

A background process that runs without user interaction, typically used for reports or updates.

System Job

Internal IBM i jobs that handle system processes (e.g., memory management, logging).

Autostart Job

A job that starts automatically when a subsystem starts.

Communication Job

A job handling network requests (e.g., FTP, Telnet).

Common Commands for Working with Jobs:

  • WRKJOB JOB(USERNAME) – Work with a specific job.
  • DSPJOB – Display details of a job.
  • ENDJOB JOB(JOBNUMBER) – End a job.
  • SBMJOB CMD(CALL PGM(PROGRAM)) JOB(MYBATCHJOB) JOBQ(QBATCH) – Submit a job to batch processing.

2. Subsystems: The Heart of Job Management

A subsystem is an IBM i component that manages jobs. Different subsystems are used to separate workloads and optimize performance.

Common Subsystems in IBM i:

Subsystem

Purpose

QINTER

Handles interactive user sessions.

QBATCH

Manages batch jobs.

QSPL

Manages spooled print jobs.

QCMN

Handles communication-related jobs.

QCTL

Primary system control subsystem.

Common Commands for Subsystems:

  • WRKSBS – Work with subsystems.
  • STRSBS SBSD(QINTER) – Start a subsystem.
  • ENDSBS SBS(QBATCH) OPTION(*IMMED) – End a subsystem immediately.
  • WRKACTJOB – View active jobs in all subsystems.

3. Job Queues and Output Queues

Job Queue (*JOBQ)

A job queue holds jobs that are waiting to be processed by a subsystem.

  • Jobs are submitted to a queue before they execute.
  • A subsystem picks up jobs from its assigned queue and runs them.

Output Queue (*OUTQ)

An output queue stores spooled files (print jobs) until they are printed or deleted.

Common Commands for Queues:

  • WRKJOBQ JOBQ(QBATCH) - Work with jobs in a job queue.
  • WRKOUTQ OUTQ(QPRINT) - Work with print jobs in an output queue.
  • CHGJOB JOB(USERNAME) RUNPTY(50) - Change job priority.

4. Work Management and Job Priorities

IBM i assigns priorities to jobs to ensure that critical processes get system resources first.

Job Priority Levels:

Priority

Impact

1-9

Highest priority (used for system-critical tasks).

10-39

High-priority jobs, such as interactive user tasks.

40-99

Lower priority (batch jobs, reports).

Changing Job Priorities:

  • Set priority when submitting a job: SBMJOB CMD(CALL PGM(MYPGM)) JOBQ(QBATCH) RUNPTY(40)
  • Change priority of a running job: CHGJOB JOB(JOBNUMBER) RUNPTY(20)

5. Best Practices for Job Management

1. Use Separate Subsystems for Workload Distribution

  • Assign batch jobs to QBATCH instead of running them in QINTER.
  • Use custom subsystems for different departments or applications.

2. Monitor and Manage Active Jobs

  • Use WRKACTJOB to check for high CPU or long-running jobs.
  • End inactive or hung jobs using ENDJOB.

3. Optimize Job Scheduling

  • Automate job execution with Job Scheduler (WRKJOBSCDE).
  • Set run priorities based on workload importance.

4. Clean Up Spooled Files Regularly

  • Delete old spooled files to free up system resources:
  • DLTSPF FILE(QPRINT)

5. Restrict User Access to Critical Subsystems

  • Limit access to QCTL and other critical subsystems.
  • Use job descriptions (*JOBD) to control job behavior.

Conclusion

IBM i job management is built around jobs, subsystems, and queues, ensuring efficient workload processing. Understanding these concepts helps administrators and users optimize performance, manage workloads, and keep the system running smoothly

0 comments
5 views

Permalink