JES
JOB ENTRY SUBSYSTEM
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
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.
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
PROCESS
CONVERSION
PROCESS
EXECUTION
PROCESS
OUTPUT
PROCESS
HARD COPY
PROCESS
PURGE
PROCESS
INITIATOR
USER
PROGRAM
USER
REPORTS
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)
4. JES2 then selects the jobs from spool data sets
for processing and subsequent execution
Input Phase (contd.)
USER
JOB ‘A’
INPUT
PROCESSING
A
A
JCL
SYSIN
SPOOL DATASET
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
INPUT
PROCESSING
A
A
JCL
SYSIN
CONVERSION
PROCESSING
A INTERNAL
TEXT
PROCEDURE
LIBRARY
SPOOL DATASET
Execution Phase
1. JES2 selects JOB A for initiation and
execution based on its job class, job selection
priority and initiator availability
1. JES2 routines despool the JCL internal text
for the initiator to use for our job
1. 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
1. JES2 routines spool SYSOUT data as the JOB A
program creates it
1. 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
PROCESSING
A
A
JCL
SYSIN
CONVERSION
PROCESSING
A
INTERNAL
TEXT
EXECUTION
PROCESSING
A SYSOUT
INITIATOR
USER
PROGRAM
SPOOL DATASET
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
PROCESSING
A
A
JCL
SYSIN
A
INTERNAL
TEXT
A SYSOUT
SPOOL DATASET
CONVERSION
PROCESSING
EXECUTION
PROCESSING
OUTPUT
PROCESSING
HARD COPY
PROCESSING
USER
REPORTS
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
PROCESSING
SPOOL DATASET
CONVERSION
PROCESSING
EXECUTION
PROCESSING
OUTPUT
PROCESSING
HARD COPY
PROCESSING
HARD COPY
PROCESSING
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
INPUT
CONVERSION
QUEUE
PROCESSINGN
QUEUE
OUTPUT
QUEUE
HARD COPY
QUEUE
PURGE
QUEUE
CONVERSION PROCESSING OUPUT HARD COPY PURGING
JCL
SYSIN
JCL
SYSIN SYSOUT
SYSOUT
NON-PRINT
OUTPUT
SPOOL
DISK
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

7162090-JES2.ppt

  • 1.
  • 2.
    Job Management • Majorgoal 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
  • 3.
    Job Management • TheMVS 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.
  • 4.
    Job Management • TheMVS 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.
  • 5.
    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
  • 6.
    Phases of JobProcessing 1. Input Phase 2. Conversion Phase 3. Execution (Scheduling) Phase 4. Output Phase 5. Hard Copy Phase 6. Purge Phase
  • 7.
    JES2 Job ProcessingPhases USER JOB INPUT PROCESS CONVERSION PROCESS EXECUTION PROCESS OUTPUT PROCESS HARD COPY PROCESS PURGE PROCESS INITIATOR USER PROGRAM USER REPORTS
  • 8.
    Input Phase • MVSuses 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
  • 9.
    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) 4. JES2 then selects the jobs from spool data sets for processing and subsequent execution
  • 10.
    Input Phase (contd.) USER JOB‘A’ INPUT PROCESSING A A JCL SYSIN SPOOL DATASET
  • 11.
    Conversion Phase 1. JES2merges 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
  • 12.
  • 13.
    Execution Phase 1. JES2selects JOB A for initiation and execution based on its job class, job selection priority and initiator availability 1. JES2 routines despool the JCL internal text for the initiator to use for our job 1. The JOB A program is initiated …contd.
  • 14.
    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 1. JES2 routines spool SYSOUT data as the JOB A program creates it 1. 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
  • 15.
  • 16.
    Output and HardCopy 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
  • 17.
    Output and HardCopy Phase INPUT PROCESSING A A JCL SYSIN A INTERNAL TEXT A SYSOUT SPOOL DATASET CONVERSION PROCESSING EXECUTION PROCESSING OUTPUT PROCESSING HARD COPY PROCESSING USER REPORTS
  • 18.
    Purge Phase 1. Afterall 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
  • 19.
    Output and HardCopy Phase INPUT PROCESSING SPOOL DATASET CONVERSION PROCESSING EXECUTION PROCESSING OUTPUT PROCESSING HARD COPY PROCESSING HARD COPY PROCESSING
  • 20.
    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
  • 21.
    Job Queue ElementControl 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
  • 22.
    JOB INPUT CONVERSION QUEUE PROCESSINGN QUEUE OUTPUT QUEUE HARD COPY QUEUE PURGE QUEUE CONVERSION PROCESSINGOUPUT HARD COPY PURGING JCL SYSIN JCL SYSIN SYSOUT SYSOUT NON-PRINT OUTPUT SPOOL DISK
  • 23.
    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
  • 24.