Module 0332: Basic JCL

Tak Auyeung, Ph.D.

February 22, 2020

Contents

1 About this module
2 What is JCL?
3 JCL line format
4 JCL structure

1 About this module

2 What is JCL?

JCL is Job Control Language, it is similar to BASH in Linux or PowerShell in Windows, but not exactly the same. First, JCL is not interactive, there is no “console mode” to interact with a user. Interaction is done using TSO ("Time Share Option") in a mainframe environment. Second, JCL specifies exactly how a job is done in details, whereas BASH or PowerShell is merely a language to specify what programs needs to run, but the operating system figures out what resources are needed and manages the resources without user specification.

It is crucial to understand the background of JCL. JCL is a language based on punched cards. A punch card has 80 columns to store what we now call 80 characters. Furthermore, computers (even “mainframe computers”) were significantly simpler than what we have today.

3 JCL line format

Because computers did not have a lot of resources for parsing, JCL was invented to specify parts based on position on a line.

All JCL statements start with two slashes (in column 1 and 2), like

//

This is important because the content of a job is interleaved with JCL statements. As a result, this JCL prefix is crucial to inform a mainframe computer whether a line (or punch card) is a part of the JCL or a part of the data.

If a line is to be treated as comment, then column 3 must be an asterisk *. Otherwise the rest of the line is interpreted as a JCL construct.

From column 3 (assuming it is not a *) to column 10 is a name. It can be the name of various constructs as we will explore in later sections. Note that this is contrary to most modern programming languages where the kind of construct being named precedes the name.

Starting exactly on column 12 is the operation. An operation specifier can terminate by a space, but it cannot extend past column 15. This means an operation can only be up to 4 characters long, but it can be shorter and be terminated by a space.

After the operation specifier, operands (additional information needed to specify the operation) can use up to column 71.

If a line is not long enough, then it can be continued under certain conditions.

4 JCL structure