JOB statement
The first line of every job. It gives the job a name and says how to treat it.
Also written //JOB, job card
Why it matters. The name on this line is the name you see everywhere: in STATUS, in the queue and in the output.
See it
Columns 3 to 10 hold the job name. Here it is ZB0001A.
Syntax
//jobname JOB (accounting),'programmer',CLASS=c,MSGCLASS=c,MSGLEVEL=(s,m),NOTIFY=userid
- jobname
- 1 to 8 characters, starting with a letter or # @ $.
- accounting
- Account information, in brackets.
- 'programmer'
- A name or note, up to 20 characters.
- CLASS
- Which queue.
- MSGCLASS
- Where the job log goes. X and H are common.
- NOTIFY
- Tell this user when the job ends.
Try it JOB
- 1
You're editing the first line of job CUSTCHK. Write the JOB statement: job name CUSTCHK, account ACCT, the description 'CHECK', class A, and print class X.
JCL //CUSTCHK JOB (ACCT),'CHECK',CLASS=A,MSGCLASS=X - 2
Submit the job CUSTCHK from your DEV JCL library.
SUBMIT 'ZB0001.DEV.JCL(CUSTCHK)' - 3
Read the JCL as the system read it, the part called JESJCL.
OUTPUT CUSTCHK JESJCL
Remember
- The name is up to 8 characters, straight after //.
- CLASS= picks the queue. MSGCLASS= picks where the log goes.
- Sites often ask for the name to start with your user ID.
The usual mistake
// CUSTCHK JOB (ACCT),'CHECK'
The space after // makes the name field empty. The system then reads CUSTCHK as the operation and rejects the job.
//CUSTCHK JOB (ACCT),'CHECK'
On real z/OS
MF/OS accepts the common JOB operands and uses CLASS and MSGCLASS. A site can check the job name against your user ID and the account number; MF/OS does not.
Where can I practise JOB statement?
Right here, at ZedBank. You take a junior job at a simulated bank and use JOB statement 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.
- JobA unit of batch work submitted to the system, made up of one or more steps that run in order.
- Job classA single-character label on a job that tells the system what kind of work it is and how to schedule it.
- SubmitHanding JCL to the system to be run, which queues it as a job and gives it a job number.