You are on page 1of 24

JES

JOB ENTRY SUBSYSTEM

Sathya
OS/390 and Job Management
• Major goal of an operating system is to process
jobs while making the best use of system
resources.
• To obtain that goal, the operating system does
resource management, which consists of the
following:
a) Before job processing, reserve input and
output resources for jobs
b) During job processing, manage resources
such as processors and storage
c) After job processing, free all resources used
by the completed jobs, making the resources
available to other jobs
OS/390 and Job Management
• The MVS system divides the management of jobs
and resources with a Job Entry Subsystem (JES).
• JES does job management and resource
management before and after job execution,
• MVS does it during job execution.
• The JES receives jobs into MVS, schedules them
for processing by MVS, and controls their output
processing.
OS/390 and Job Management
• The MVS system divides the management of jobs
and resources with a Job Entry Subsystem (JES).
• JES does job management and resource
management before and after job execution.
• MVS does it during job execution.
• The JES
1) Receives jobs into MVS
2) Schedules them for processing by MVS
and
3) Controls their output processing.
Types of JES
• JES is of two types:
1) JES2
2) JES3

• JES2 provides the function of Job Entry


Subsystem in a Uniplex environment

• JES3 provides the function of Job Entry


Subsystem in a Multiiplex environment
Phases of Job Processing

1. Input Phase
2. Conversion Phase
3. Execution (Scheduling) Phase
4. Output Phase
5. Hard Copy Phase
6. Purge Phase
JES2 Job Processing Phases
USER JOB

INPUT CONVERSION EXECUTION OUTPUT HARD COPY PURGE


PROCESS PROCESS PROCESS PROCESS PROCESS PROCESS

INITIATOR USER
REPORTS

USER
PROGRAM
Input Phase
• MVS uses Internal Readers to pass to JES2 the
JCL for:
1. Started Tasks
2. MOUNT Commands
3. TSO Logon Requests
• An Internal Reader is a program that other
programs can use to submit jobs and commands
to JES2
• Internal Reader types:
INRDR, STCINRDR, TSOINRDR
Input Phase (contd.)
1. JES2 reads job stream (JCL and SYSIN data)
2. JES2 assigns a JOB ID to each job
3. JES2 places the Job’s JCL and SYSIN input
data into DASD dataset called SPOOL data
sets
(SPOOL stands for Simultaneous Peripheral
Operations On-line)
5. JES2 then selects the jobs from spool data sets
for processing and subsequent execution
Input Phase (contd.)
USER
JOB ‘A’

INPUT
PROCESSING
SPOOL DATASET

A JCL
A SYSIN
Conversion Phase
1. JES2 merges invoked procedure JCL into JOB
A’s job stream
2. The resulting job stream is scanned for syntax
errors
3. The JCL statements are prepared for use in
initiating the job
4. The JCL for the converted job is stored in a
format called Internal Text on the spool data set
Conversion Phase
PROCEDURE
LIBRARY

INPUT CONVERSION
PROCESSING PROCESSING

SPOOL DATASET

A JCL
A SYSIN
A INTERNAL
TEXT
Execution Phase

1. JES2 selects JOB A for initiation and


execution based on its job class, job selection
priority and initiator availability

3. JES2 routines despool the JCL internal text


for the initiator to use for our job

5. The JOB A program is initiated

…contd.
Execution Phase (contd.)
1. As the JOB A program executes, JES2 routines
despool the SYSIN data and makes it available
to the program as is needed

3. JES2 routines spool SYSOUT data as the JOB


A program creates it

5. JES2 monitors the number of SYSOUT records


and the length of time the program executes. If
the limit is exceeded, JES2 will notify the user
Execution Phase
INPUT CONVERSION EXECUTION
PROCESSING PROCESSING PROCESSING

SPOOL DATASET INITIATOR


A JCL
A
USER
SYSIN
PROGRAM
INTERNAL
A
TEXT
A SYSOUT
Output and Hard Copy Phase
1. When the entire job has concluded, it is
eligible for Output Processing
2. Information about the JOB A’s SYSOUT
data sets (such as SYSOUT class, setup
requirements, etc) is gathered and
summarized in JES2 control blocks
3. The job is ready for Hard Copy processing
4. The SYSOUT data sets are despooled
and transferred to printers
Output and Hard Copy Phase
INPUT CONVERSION EXECUTION OUTPUT HARD COPY
PROCESSING PROCESSING PROCESSING PROCESSING PROCESSING

SPOOL DATASET
USER
REPORTS
A JCL
A SYSIN
INTERNAL
A
TEXT
A SYSOUT
Purge Phase
1. After all of JOB A’s data sets have been
printed, the job is ready for Purge
Processing
2. Spool spaces is reclaimed for reuse by
JES2
3. The Job disappears from the system
4. JES2 no longer knows about the job
Output and Hard Copy Phase
INPUT CONVERSION EXECUTION OUTPUT HARD COPY
PROCESSING PROCESSING PROCESSING PROCESSING PROCESSING

HARD COPY
PROCESSING
SPOOL DATASET
Tracking User’s Jobs
1. In order to keep track of the user jobs,
JES2 uses internal control blocks
2. The control blocks are called JOB QUEUE
ELEMENTS (JQEs)
3. JES2 uses the following data sets to keep
track of control blocks:
a) SPOOL
b) CHECKPOINT
c) ALTERNATE or DUPLEX
CHECKPOINT
Job Queue Element Control
Blocks(JQE)
1. One JQE is used for each job (batch job, started
task or TSO logon)
2. JQE stores:
a) Job’s Name
b) Job Number assigned by JES2
c) Job selection priority
d) SYSOUT routing information
e) Information as to where job’s JCL, SYSIN and
SYSOUT data are stored on spool data set
JOB
CONVERSION PROCESSINGN OUTPUT HARD COPY PURGE
QUEUE QUEUE QUEUE QUEUE QUEUE

INPUT CONVERSION PROCESSING OUPUT HARD COPY PURGING

SYSIN SYSOUT

JCL
SYSOUT
JCL
SYSIN
SPOOL
DISK
NON-PRINT
OUTPUT
Checkpoint Data Set
1. When JES2 terminates, jobs that have not yet
been executed and SYSOUT data sets that have
not been transcribed remain on the Spool data
set
2. When JES2 is started again, the jobs and
SYSOUT data that remained on the spool can be
processed by as if there had been no lapse in
the JES2 execution
3. The resumption of JES2 is called WARM start
4. Warm start is possible because of the
information stored in Checkpoint data set
JES2 START PROCEDURE

You might also like