Introduction
Why do we need JCL?
To complete a task (assume it is program execution) in the mainframe environment, a set of instructions should provide to the mainframe. The set of instructions are like - what program to execute, from where the program runs, and all other parameters information. These sets of instructions are coded using the JCL control statements.
What is JCL?
JCL (Job Control Language) is a programming language used on IBM mainframe operating systems.
JCL is a language with a set of predefined instructions that are used by the JOB ENTRY SUBSYSTEM (JES2 or JES3) to instruct the system on how to run a batch job or start a subsystem.
Where JCL used?
In the mainframe environment, each task is executed in two different ways - Batch process and the Online process.
Example of the batch process - Bulk updates of bank credit card transactions (processing after 11:50 PM of the respective day) to reflect in the current statement. Example of the online process - Withdrawal of money (immediately updated by the bank employee or ATM).
The batch process allows processing in the background and notifies the status once the task is completed. It does not need the user's continuous interaction and enables the user to perform multi-tasking parallelly. Batch process requests are submitted (manually by the user or automatically by the schedular) using JOB (coded with JCL control statements).
JCL is used only for batch processing, and CICS is used for Online processing. JCL or CICS works in the environment where it is designated and doesn't work in another.
When to use JCL?
JCL is used to create JOBs to perform the below tasks in the batch environment -
- To process large volumes of data.
- To compile the programs.
- To run the programs.
- To run the utilities.
- To create, delete, and read files.
- Many more..
What JCL provide to OS?
JCL provides the below information to the OS about the task you need to perform -
- JOB accounting(CPU billable time), job owner.
- JOB priority, type information.
- Program/utility/procedure that should run.
- From where the utility should run.
- Input and output datasets that are needed to run.
What is a JOB?
We need to code some JCL statements together to perform a task. All the statements coded together for a task are called as JOB. A JOB can be coded in a member of PDS or added to version control tools like Endevor or Changeman.
JOB is used to provide required resources information such as file names, the location of a file, compiled module location, parameters, and more.
What JOB can do?
- Submit a task to the operating system for processing.
- Pass values to an application program using PARM parameter in EXEC statement.
- Compile a program.
- Bind a program (COBOL + DB2).
- Run a program (COBOL / COBOL + DB2).
- Bind DB2 program.
- Create datasets. i.e., PS and PDS.
- Create GDG and VSAM files.
- Execute the utilities like IEBCOPY, DFSORT, IEBGENER, and IDCAMS.
- Copy data from one file to other.
- And so on..
JCL is needed in every aspect of the mainframe system and is very important to perform tasks easily.