Monday, April 6, 2009

Basic Concepts of Job Control Language JCL - Tutorial 01

Q. What is a Job?
A. Mainframe computers are used to process data. They perform tasks or operations on the data, to generate valuable information as Output. A job is a set of tasks performed on input data, to produce output results.

For example, a job might consist of Reading Input data records from a file, arranging the Input data records in order(sort them), and write the sorted records data to Output File.

Q. What is a batch of Jobs? What do you mean by Batch Processing?
A. Think of an auto-assembly line in a car factory. Each car is processed automatically by a robot. There are several cars in Queue.

Analogous to this, in a Batch System, there is a series of jobs in queue, and are run one after the other, without any human intervention.

A complete batch of jobs, takes time to run, and give the finished product(output result). A batch of jobs can be seen as a production line in the factory.

So, there are data processing tasks, that take lot of time, e.g. generating credit card statement of all the customers of a bank. The output result(statements) cannot be immediately obtained. Large corporate organisations use a batch of jobs to perform such tasks at regular intervals, say for example monthly.

Everytime, you swipe your credit card, withdraw money from the Automated Teller Machine, transfer funds to your friend’s bank account, a Mainframe computer crunches the data, and runs a batch of jobs.

In fact, if you transfer funds to your friend’s account in a nationalised bank like State Bank of India, it doesn’t get credited immediately. The reason for this is, the entries get processed in batches(bunches) in different time slots(9-11 a.m.,11-1 p.m.,...) on the RBI’s NEFT Servers.



Q. What is Job Control Language(JCL)?
A. JCL specifies to the MVS Operating System, what resources your program expects to use. JCL acts as an interface between your COBOL program (JOB) and the OS.








Any JCL can be divided into 3 logical groupings as shown in the above diagram.

JOB Identification -
JOB1 - Name of the Job
JOB - This is a job. Everything that follows relates to this JOB.
(A123) - Account to which the computer time is to be billed.
'STUDENZONE S' - Programmer's name
PRTY = 6 - Jobs within a class are assigned a priority.


Program Identification -
//STEP1 - Stepname. JOB consists of many tasks(steps).
EXEC - Beginning of the JOB Step

PGM = PROGRAM1 ; Name of the program that is to be executed