In JCL every line which is not commented out or empty, is a statement.
A JCL line is 80 characters long from which a statement is read in the first 72, beginning from the very first character, even if that is a space. The JCL does not evaluate characters after the 72th character. It is possible to inject some commenting information after the 72th character, e.g. <== TEXT TEXT TEXT.
Not JCL statements:
in‑stream data (after DD *)
comments (//*)
empty lines
The statements are divided into sections:
name
operation
parameter
EXAMPLE FOR JCL STATEMENTS:
The name section of the statement:
maximum 8 characters, containing A..Z, 0..9, @, #, $
defines a name for the statement line
this name is needed by the executed program or other operations but if not, any names can be used
not obligatory if the operation does not need it (usually there is in JOB statements but in DD statements it is usually missing)
the // at the beginning is obligatory
The operation section defines the type of the statement (analogue with DOS commands). The operations are defined in STEPLIB, JOBLIB or system load-libraries.
The parameter section contains a key=value pair or multiple pairs. Keys:
DSN=… (dataset name)
DISP=… (disposition)
PGM=… (name of program)
&SYSUID., ... (symbolics)
* (in‑stream data, only for a DD statement)
PARM='…' (options)
Separation of multiple keys:
KEY=VALUE,KEY=VALUE
KEY=VALUE, KEY=VALUE (preferred)
KEY=VALUE , KEY=VALUE
The order of the parameters is indifferent.
If a parameter contains more values, the value set is written in brackets, and their order is important (e.g. DISP parameter).
The PARM value in quotes is space-sensitive.
EXAMPLE FOR FULL JCL STATEMENTS: