What is JES in JCL?
- JCL JES stands for JOB Entry Subsystem. We use JES to accept jobs to the MVS operating system like Z/OS in Mainframe. JES acts as a Job manager. Once we receive the jobs, JES schedules these JOBS based on their priority and it looks for msglevel, msgclass, PRTY etc and based on the priority of the Jobs, JES allocates resources to these Jobs and it processes the output generated by these JOBS. In the end, JES purges the jobs to free up space and resources.
- JCL JES schedules job in SPOOL. For example, if you want a job to run at 09:00 AM on a particular day or at 04:00 PM every day or any other time, we can simply schedule that job using JES. In most of the cases, admin does these things, not the developer. Jobs can also run based on some external event or one job can trigger another job to run as well. Please note that it is not mandatory for a job to get trigger by a mainframe process only. This means that we can also trigger JCL by UNIX Process, JAVA application or any other process.
Two versions of JES in JCL
- JES2 – JOB Entry Subsystem2 –
- JES2 is the functional component of JES which is responsible to receive the jobs into the operating system, spooling, schedule the jobs, manage the jobs and processing the output of the job. JES manages the jobs before running a program and after running a program.
- On JES2, you can transmit from one node to another using XMIT command.
- You can assign the priority too jobs using /*priority command
- JES3 – JOB Entry subsystem3 – JES3 is responsible for managing the job before running a program, during the running process of a program and after the running of a program.
Difference between JCL JES 2 and JCL JES 3
|JES 2 is not responsible for managing jobs during the running process of a program hence, JES2 does not manage Execution (Processing) phrase.||JES 3 is responsible for managing jobs during the running process of a program as well. Hence, JES2 does not manage Execution (Processing) phrase.|
|JES2 is decentralized||JES3 is centralized|
|If JES2 has multiple processors, say 3 processor, then each processor manages its own input, scheduling and processing the output of the jobs. Here, each processor is independent of each other.||If JES2 has multiple processors, say 3 processor, then each processor is dependent on each other and the management of input, processing of a job, scheduling and processing the output of the jobs manages from a centralized global JES3 processor.|
|/*$ command statement||/** command statement|
There are 5 phases in a JOB execution –
- Input – When we submit a job a job, JES2 reads this and assigns an identifier to that job. JES 2 assigns a SPOOL space to each job and holds the spool space for that particular job
- Conversion – During this phase, JES 2 converts the JOB into an interpreter text so that it can be recognized by JES2 and other scheduler functions of MVS operating system. If there are no errors for the job, it queues the Job for Execution phase else it does not send the job for Execution phase and sends the error as output.
- Execution or Processing – All the Jobs which are waiting for the execution are processed one by one based on the priority through initiators. JES2 searches for the jobs and sends it to initiators and initiators helps to initiate the processing of the jobs.
- Output – JES 2 controls the output of the JOB using the ‘SYSOUT’ defined in the JOB which contains the output related to datasets used in the JOB, any other output messages related to the job or any system related output. This JOB queues for Print phase.
- Print Punch (hard copy) – It pulls the job from the output phase and prints to either same node or a different node. The datasets which we use for the JOB are punched and the print of the JOB is also taken. It is scheduled for the purge phase.
- Purge – During this phase, JES2 release the resources allocated to jobs like SPOOL Space, DASD etc. The Jobs are purge by JES 2 and the resources and spool space are free for other jobs.
JCL Interview Question and Answers
You will not be able to answer few questions here but we will answer all those once you proceed further with this tutorial.
1. On JES2 system, to transmit the from node to another node the JCL statement used is