JCL
The language that tells the machine which programs to run, in what order, with which files.
Also written Job Control Language, job control
Why it matters. Every batch job is JCL. If you can read JCL, you can see what a job does before it runs.
See it
Every job starts with a JOB statement. It names the job.
Syntax
//name JOB (accounting),'programmer',CLASS=c,MSGCLASS=c //stepname EXEC PGM=program //ddname DD DSN=name,DISP=SHR //* comment /* end of in-stream data
- JOB
- Starts the job and names it.
- EXEC
- Starts a step.
- DD
- Describes one file for the step.
- //*
- A comment.
- /*
- Ends in-stream data.
- PROC / PEND
- Start and end a procedure.
Try it SUBMIT
- 1
Start the job in the member CUSTCHK of your DEV.JCL library.
SUBMIT 'ZB0001.DEV.JCL(CUSTCHK)' - 2
Read the JCL as the system read it: the part called JESJCL.
OUTPUT CUSTCHK JESJCL
Remember
- JCL describes work. It does not calculate.
- JOB names the job. EXEC starts a step. DD connects files.
- Lines start with // in the first two columns.
The usual mistake
CUSTCHK JOB (ACCT),'CHECK'
The two slashes are missing. The system only reads lines that start with //.
//CUSTCHK JOB (ACCT),'CHECK'
On real z/OS
MF/OS reads JCL the way the converter does, with columns 1 to 71 and continuation by a trailing comma, and rejects what real z/OS rejects in most cases. It does not support RESTART=, ADDRSPC= or USER=/PASSWORD= on the JOB statement, and its syntax check (TYPRUN=SCAN) catches far less than the real one.
Where can I practise JCL?
Right here, at ZedBank. You take a junior job at a simulated bank and use JCL in real work, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- JobA unit of batch work submitted to the system, made up of one or more steps that run in order.
- JOB statementThe first statement in every job, giving it a name and telling the system who is running it and how to treat it.
- EXEC statementThe JCL statement that starts a step by naming the program or procedure to run.
- DD statementThe JCL statement that connects a name inside a program to a real dataset outside it.
- Batch processingRunning work in bulk, without anyone watching, usually on a schedule. The overnight run that settles a day of transactions.
- SubmitHanding JCL to the system to be run, which queues it as a job and gives it a job number.