How a job becomes running work: JES2
When you submit a batch job, it does not start immediately. A component called the job entry subsystem takes it in, queues it, decides when to run it, collects its output and holds that output for you. Understanding this queue is what lets you answer 'why hasn't my job run?'.
The life of a job
Two of these stages are where jobs get stuck, and they get stuck for different reasons:
- Waiting for execution — the job is valid but has not been given resources yet. Usually a busy job class, an initiator limit, or a held class.
- Waiting on a dataset — the job needs exclusive use of something another job holds. This is the classic overnight hang.
The three vocabulary items you need
| Term | Meaning |
|---|---|
| Job class | A letter on the JOB card grouping jobs by expected resource use. Sites map classes to initiators. |
| Initiator | A slot that runs one job at a time. If all initiators for your class are busy, you wait. |
| MSGCLASS / SYSOUT class | Where printed output goes. Class X or similar usually means 'hold it for me to read on screen'. |
//PAYRUN01 JOB (ACCT01),'V SAHA', // CLASS=A, <- job class, picks the initiator pool // MSGCLASS=X, <- where system messages go // NOTIFY=&SYSUID, <- tell me when it ends // REGION=0M <- memory limit; 0M means 'as much as allowed'
Where the output lives
Everything a job prints — system messages, your program's messages, JCL listings, abend dumps — goes to the spool, a system-managed pool of output. You read it with SDSF or an equivalent. Output stays there until it is purged, which is why the first instruction in almost every problem ticket is 'send me the job output'.
Common mistakes
Some classes are deliberately held so jobs queue until released. Check the class before escalating.
Purge your output when finished. Spool is a shared resource with a real limit.
They look similar in a ticket and have completely different causes. Always establish which one first.
What you will see at work
- Almost every investigation starts with finding the job on the spool and reading it top to bottom.
- Your site will have conventions about which job class to use for what. Using the wrong one is a common new-starter mistake and is easily fixed.
- NOTIFY=&SYSUID sends you a message when the job ends — worth putting on everything you submit while learning.
Key terms
Check your understanding.
Take this lesson's quiz and save your progress. Free.