Professional Documents
Culture Documents
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
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
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
…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
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
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