Job
One piece of batch work, made of steps that run in order.
Also written batch job
Why it matters. Everything the bank runs overnight is a job. You send it in, it runs, and you read what it left behind.
See it
Follow HELLO through the queue
Submit it, and watch JES2 take it from there.
- 1Taken in
- 2Waits its turn
- 3Runs
- 4Ends, output kept
READY SUBMIT 'ZBANK.DEV.JCL(HELLO)'
Syntax
//jobname JOB (accounting),'name',CLASS=c,MSGCLASS=c SUBMIT 'library(member)' STATUS jobname
- jobname
- Up to 8 characters. Names the job everywhere.
- job number
- JES2 gives JOBnnnnn. It is the way to find one run.
- steps
- EXEC statements, run in order.
- RC
- A return code for each step.
- spool
- Where the output waits.
Try it SUBMIT
- 1
Send the job in the member CUSTCHK to run.
SUBMIT 'ZB0001.DEV.JCL(CUSTCHK)' - 2
Ask where your jobs are now.
STATUS
Remember
- A job is named in its JOB statement and numbered by JES2.
- It goes through: submit, wait in the queue, run, leave output.
- Its steps run in order.
The usual mistake
Submitting the same job twice to be sure
Each submit is a new job with a new number. Both run, and the work is done twice.
Check STATUS before you submit again
On real z/OS
MF/OS prints STATUS in the style of IKJ56192I, with a note in brackets. Real STATUS shows the job state only, such as ON OUTPUT QUEUE or EXECUTING. The job numbers here come from the simulator.
Where can I practise Job?
Right here, at ZedBank. You take a junior job at a simulated bank and use Job in real work, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- JCLJob Control Language: the language used to tell the mainframe what programs to run, in what order, and with what files.
- Job stepOne program execution within a job. A job is simply a sequence of steps that run in order.
- SubmitHanding JCL to the system to be run, which queues it as a job and gives it a job number.
- JES2The job entry subsystem: the part of z/OS that queues jobs, decides when they run, and collects their output.
- SpoolThe system-managed holding area where job output waits to be read, printed or purged.
- Return codeA number a program leaves behind saying how it went. Zero for clean, higher numbers for warnings and failures.