Job Processing Phases in JES2

Work to be processed by a z/OS system has to be defined using Job Control Language (JCL). JCL is used to define which program to execute, which resources to allocate, whom to notify, and so forth. This description of work is called a job.

z/OS uses a Job Entry Subsystem (JES) to receive jobs into the operating system, schedule them for processing, and to control their output processing. The actual execution of a job is handled by an initiator.

The process of job processing can be divided into the following five stages:

– Input Phase

– Conversion Phase

– Execution Phase

– Output Phase

– Purge Phase

For JES2 these phases represent:

1. Job Input phase

JES2 jobs can be entered on input devices such as card readers, remote terminals, or other programs. Jobs can also come from other nodes in a job entry network and from internal readers. (An internal reader is a program that other programs can use to submit jobs, control statements, and commands to JES2.)

As JES2 reads the input stream, it assigns a job identifier to each job and places each job’s

JCL, optional JES2 control statements, and data within the job (SYSIN data) onto DASD data sets called spool data sets. Simultaneous peripheral operations online (Spool) refers to the direct access device that contains the spool data sets. Spooling provides simultaneous processing and a temporary storage area for work that is not yet completed.

Later on, JES2 selects jobs from the spool data sets for processing and subsequent running.

2. Conversion phase


JES2 uses a converter program to analyze each job’s JCL statements and to perform a syntax check. It also determines if the JCL includes any procedure calls. If so, the converter takes the job’s JCL and merges it with the JCL from the procedure library (for example, SYS1.PROCLIB), and converts the composite JCL into internal text.

The internal text is stored in the spool data set. If, during the job conversion any JCL errors are detected, JES2 issues the proper error messages and queues the job for output processing. If JES2 detects no errors, it queues the job for further processing according to its priority within its job class.



3. Execution phase


Before work can be processed on a z/OS system, initiators have to be started. An initiator is started either by an operator or automatically by JES2 when the system is initialized. If an initiator is ready to process work, it requests a job from JES2.

JES2 selects jobs based on the job classes that are assigned to the initiator and the priority order in which the job classes should be searched. When JES2 selects a job, it passes it to the initiator. The initiator then invokes the interpreter to build control blocks from the internal text that the converter created for the job.

The initiator allocates the resources specified in the JCL for the first step of the job. This allocation ensures that the devices are available before the job step starts running. The initiator then starts the program requested in the JCL EXEC statement.

JES2 and the base control program communicate constantly to control system processing.

The communication mechanism, known as the subsystem interface, allows z/OS to request services of JES2. For example, a requestor can ask JES2 to find a job, do message or command processing, or open (access) a SYSIN or SYSOUT data set. Further, the base control program notifies JES2 of events such as messages, operator commands, the end of a job, or the end of a task.



4. Output phase


JES2 controls all output processing, that is, system messages that must be printed, as well as data sets requested by the user that must be printed or punched. After a job finishes, JES2 analyzes the characteristics of the job’s output in terms of its output class and device setup requirements; then JES2 groups data sets with similar characteristics. JES2 queues the output for print or punch processing.

JES2 selects output for processing from the output queue. It can contain output that is to be processed locally or output to be processed at a remote location (either a remote job entry (RJE) workstation or another node known as network job entry (NJE)). After processing all the output for a particular job, JES2 puts the job on the purge queue.



5. Purge phase


When all processing for a job completes, JES2 releases the spool space assigned to the job, making the space available for allocation to subsequent jobs. JES2 then issues a message to the operator indicating that the job has been purged from the system.

Be the first to comment

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.