zLog

Introduction to JCL

Initially, when the computers were new to the world, the size of the computers was huge and very clumsy to use. Also, initially there were no display terminals. So, there were switches on the front panel of the computers to indicate the task to be performed. Computers understand only 0s and 1s. So, if the switch was ON, it indicated 1s and if the switch was OFF, it indicated 0s.

Why JCL was invented?

Research and Development was taking place, different languages were introduced. COBOL was one of them.

At the same time punch cards were invented. These punch cards were basically cardboard cards with 80 columns. Each card represented 1 line on a sheet of paper. Each column on the card had enough space for multiple holes to be punched in it.

When a hole was punched, it represented 1, which was similar to a switch in ON position. And an unpunched hole represented 0 – similar to switch in OFF position.

Logic was coded in such a manner that the combination of holes and non-holes at any column of the punch card represented a letter, or digit, or any symbol.

Punch Card

Along with the punch cards, punch machines were introduced. These punch machines had type writer keyboards which would punch holes into the punch cards for every key pressed. So, if the user typed the letter A, then the machine punched holes for the code for A. Then move on to next column, type in next character, then next character and so on…

Punch cards and machines were used by scientists and engineers for writing program logic and read the same in computer.

You might be thinking how computers understood in which computer language the program was written? Also, if any data was to be used from the disk or a tape for program execution, how did computer understand?

Things were getting complicated, ideas were flowing in, and then the scientists decided that there should be 1 program running all the time which would basically read the cards and decide what to do with them. Sounds like a master control? Yeah, you got it right. However, things were complex as there were too many tasks to look after. So, they came up with a set of programs, which would eventually operate the computer. These set of programs were called as a “System”.

And this is how Operating System (OS) developed. With time, there were enhancements, and MVS was introduced.

Coming back, the System or OS read the cards and identified in which programming language it was written. Sometimes, it would store the programs for later use or execute a previously saved program.

So, eventually the OS stored all the programs in libraries on disk. Punch cards were used to carry out a specified task as and when required. These were nothing but the JOBs which were then replaced and controlled by a new language called Job Control Language or JCL.

This is how JCL was invented!

Let’s discuss more about JCL….

What is JCL (Job Control Language)?

While working in Mainframe environment, we need to instruct the system to execute some task or a series of tasks in sequence. This is done using a JCL.

A JCL will instruct the system (z/OS) from where to get the input, which program(s) or utilities will use that input, and what to do with the resulting output.

So, the question will arise, where should I or where will I make use of a JCL?

As a Mainframe developer, you’d use JCL in many ways, for instance –

You being a developer, have coded/written a COBOL code. How will you compile that COBOL code? Or how will you execute that COBOL code?

For this, we will have to use a Compile JCL which will compile a COBOL code and then execute the same.

(Please note that a compile JCL can be used to compile both batch and online programs. However, only batch programs are executed thru JCL).

This is just 1 example. There will be different instances where you have a file and you need to check whether that file is empty or not, that can be done using JCL.

Below are the different instances where a JCL can be used:

While working on Mainframe, a JCL and a JOB can be used interchangeably – however, which is correct, is a debatable topic.

A ‘JOB’ is a ‘JCL’ with a ‘Job-Card’; a ‘PROC’ is a ‘JCL’ without a ‘Job-Card’. So, you might see these terms being used as synonyms but you know the difference now!

So, loosely, it is okay if you say ‘I’ve submitted a job’, which is same as saying ‘I’ve submitted a JCL’.

But, someone just might argue on this, and hopefully, you’ve a reason to understand such an argument now.

We hope this tells you what a JCL in mainframe basically is.

Now, what does a JCL basically contain?

JCL “simulates” a task on mainframe in the form of control statements which are 80-bytes long.

Each statement is divided into 5 fields. This is as shown in below picture which illustrates the JCL coding sheet.

Identification Field

Name Field (Optional)

Operation Field

Parameter/Operand Field

Comment Field (Optional)

Basic JCL codification rules:

This explains the coding structure for JCL and you are now good enough to continue with the different type of JCL statements which we will cover up in the next discussion.

There are 3 main types of control statements in a job:

We will discuss about the 3 control statements in the next session.

Why JCL statements are only 80-bytes in length?

In old mainframe systems, punch cards were used as inputs and since these cards had only 80 characters per record, JCL has restricted the control statements length to 80-bytes.

Exit mobile version