Transcript Slide 1
Introduction to z/OS Basics
Chapter 7: Batch processing and the Job Entry
Subsystem (JES)
Batch processing and JES
© 2006 IBM Corporation
Chapter 07 Batch and JES
Chapter objectives
Be able to:
Give an overview of
batch processing and
how work is initiated
and managed in the
system.
Explain how the job
entry subsystem (JES)
governs the flow of
work through a z/OS
system.
2
© 2006 IBM Corporation
Chapter 07 Batch and JES
Key terms in this chapter
3
batch processing
procedure
execution
purge
initiator
queue
job
spool
job entry
subsystem (JES)
symbolic reference
output
workload manager
(WLM)
© 2006 IBM Corporation
Chapter 07 Batch and JES
Job Management
4
© 2006 IBM Corporation
Chapter 07 Batch and JES
What is batch processing?
Much of the work running on z/OS consists of programs
called batch jobs.
Batch processing is used for programs that can be
executed:
– Minimal human interaction
– At a scheduled time or on an as-needed basis.
After a batch job is submitted... normally no further
human interaction until complete.
5
© 2006 IBM Corporation
Chapter 07 Batch and JES
What is JES?
JES manages the input and output job queues and
data.
JES handles the following aspects of batch work:
– Receives jobs
– Schedules them for execution
– Controls their output processing
6
© 2006 IBM Corporation
Chapter 07 Batch and JES
What is JES? (continued)
z/OS offers two types: JES2 and JES3
Some differences, but both JES2 and JES3:
– Accept and queue jobs
– Queue jobs for an initiator -- a program that requests the next
job in the queue
– Accept output from a job while it is running and queue the
output
– Can print the output, or save it on spool for an output manager
to retrieve.
7
© 2006 IBM Corporation
Chapter 07 Batch and JES
Why a JES
8
© 2006 IBM Corporation
Chapter 07 Batch and JES
JES FUNCTIONS
9
© 2006 IBM Corporation
Chapter 07 Batch and JES
JCL Related Actions
10
© 2006 IBM Corporation
Chapter 07 Batch and JES
Phases of Job Processing
11
© 2006 IBM Corporation
Chapter 07 Batch and JES
Batch flow (simplified)
JCLProcessing
JES
JOBs
Initiator
ca
Allo
rtion
to
In-itia
- Execution
submit
L
O
S
L
O
O
PO
SP
cation
- Allo
- Cleanup
- Execution
- Cleanup
Printer
12
© 2006 IBM Corporation
Chapter 07 Batch and JES
What is spooling?
Spooling is a method for queuing and holding data
for input or output.
JES uses one or more disk data sets for spooling.
Input jobs and printed output from many jobs are
stored in the single (conceptual) spool data set.
13
© 2006 IBM Corporation
Chapter 07 Batch and JES
What an initiator does
To run multiple jobs asynchronously, z/OS uses
initiators to:
– Ensure that jobs do not conflict in data set usage
– Ensure that single-user devices (tape drives) are allocated
correctly
– Find executable programs requested by jobs
– Clean up after the job ends and request the next job
14
Preventing two users from accessing the
same data at the same time is critical to z/OS and
the ability to do this is one of the defining
characteristics of the operating system.
© 2006 IBM Corporation
Chapter 07 Batch and JES
Symbolic references to files ...DD Names
z/OS normally uses symbolic references to files
(data sets) rather than actual file names.
The use of symbolic references provides a naming
redirection between a data set-related name used
in a program and the actual data set used during
execution of that program.
15
© 2006 IBM Corporation
Chapter 07 Batch and JES
How a symbolic file system is used
D
D
N
A
M
E
p
r
o
g
r
a
m
D
S
N
A
M
E
J
C
L
fo
rJ
O
B
O
P
E
N
F
IL
E
=
X
Y
Z
R
E
A
D
F
IL
E
=
X
Y
Z
//X
Y
ZD
D
D
S
N
A
M
E
=
M
Y
.P
A
Y
R
O
L
L
...
C
L
O
S
E
F
IL
E
=
X
Y
Z
16
M
Y
.P
A
Y
R
O
L
L
© 2006 IBM Corporation
Chapter 07 Batch and JES
How a symbolic file system is used (continued)
D
D
N
A
M
E
p
r
o
g
r
a
m
D
S
N
A
M
E
J
C
L
fo
rJ
O
B
O
P
E
N
F
IL
E
=
X
Y
Z
R
E
A
D
F
IL
E
=
X
Y
Z
//X
Y
ZD
D
D
S
N
A
M
E
=
D
IV
1
.P
A
Y
R
O
L
L
D
IV
1
.P
A
Y
R
O
L
L
...
C
L
O
S
E
F
IL
E
=
X
Y
Z
17
© 2006 IBM Corporation
Chapter 07 Batch and JES
JES, job management, and JCL
Job control language (JCL) is the language used by a
batch job to request resources and services from the
operating system.
Through JCL, you specify:
– Who you are (important for security reasons).
– Which resources (programs, files, memory) and
services are needed from the system to process your
program.
The use of JCL is covered in detail in the next
module.
18
© 2006 IBM Corporation
Chapter 07 Batch and JES
Related actions with JCL
ITUSERACTIO
NS
Determ
ine
theneed
and
characteristics
of theJob
Create
theJCL
SYSTEMACTIO
NS
JESinterprets
JCLand
passesit to
z/OSinitiator
Subm
it
theJob
z/OS
m
anages
eachstep
of execution
System
M
essages
User
views
and
interprets
output
19
JESprints
output
JEScollects
theoutput and
inform
ation
about theJob
© 2006 IBM Corporation
Chapter 07 Batch and JES
Spooling
JCL
program
JES 1
read 2
//DD1 DD*
…
…
...............
data
…
…
...............
/*
spool
//DD2 DDSYSOUT=A
JES 4
SYSOUT
write 3
Printer
20
© 2006 IBM Corporation
Chapter 07 Batch and JES
Two-step job
First step
Master
Second step
Program
Tape
21
Master
Updates
Program
Master
Printer
© 2006 IBM Corporation
Chapter 07 Batch and JES
Job flow through the system
During execution, a job goes through the
following phases:
– Input
– Conversion
– Processing
– Output
– Print (to hardcopy or a console display)
– Purge
22
© 2006 IBM Corporation
Chapter 07 Batch and JES
Phases of job flow: input
JO
B
C
O
N
VER
SIO
N
Q
U
EU
E
IN
PU
T
JC
L&SYSIN
23
C
O
N
VER
SIO
N
PR
O
C
ESSIN
G
O
U
TPU
T
H
AR
D
-C
O
PY
PU
R
G
E
SPO
O
L
D
ISK
© 2006 IBM Corporation
Chapter 07 Batch and JES
Phases of job flow: conversion
JO
B
IN
PU
T
C
O
N
VER
SIO
N
Q
U
EU
E
EXEC
U
TIO
N
Q
U
EU
E
C
O
N
VER
SIO
N
PR
O
C
ESSIN
G
O
U
TPU
T
H
AR
D
-C
O
PY
PU
R
G
E
JC
L
SPO
O
L
D
ISK
24
© 2006 IBM Corporation
Chapter 07 Batch and JES
Phases of job flow: execution
JO
B
IN
PU
T
C
O
N
VER
SIO
N
EXEC
U
TIO
N
Q
U
EU
E
O
U
TPU
T
Q
U
EU
E
PR
O
C
ESSIN
G
O
U
TPU
T
SYSIN
H
AR
D
-C
O
PY
PU
R
G
E
SYSO
U
T
SPO
O
L
D
ISK
25
© 2006 IBM Corporation
Chapter 07 Batch and JES
Phases of job flow: output and hardcopy
JO
B
IN
PU
T
C
O
N
VER
SIO
N
PR
O
C
ESSIN
G
O
U
TPU
T
Q
U
EU
E
H
AR
D
-C
O
PY
Q
U
EU
E
PU
R
G
E
Q
U
EU
E
O
U
TPU
T
H
AR
D
-C
O
PY
PU
R
G
E
SYSO
U
T
N
O
N
-PR
IN
T/PU
N
C
H
O
U
TPU
T
SPO
O
L
D
ISK
26
© 2006 IBM Corporation
Chapter 07 Batch and JES
Phases of job flow: purge
JO
B
P
U
R
G
E
Q
U
E
U
E
IN
P
U
T
C
O
N
V
E
R
S
IO
N
P
R
O
C
E
S
S
IN
G
O
U
TP
U
T
H
A
R
D
-C
O
P
Y
P
U
R
G
E
S
P
O
O
L
D
IS
K
27
© 2006 IBM Corporation
Chapter 07 Batch and JES
Job flow through the system
JO
B
IN
P
U
T
C
O
N
V
E
R
S
IO
N
Q
U
E
U
E
E
X
E
C
U
TIO
N
Q
U
E
U
E
O
U
TP
U
T
Q
U
E
U
E
H
A
R
D
-C
O
P
Y
Q
U
E
U
E
P
U
R
G
E
Q
U
E
U
E
C
O
N
V
E
R
S
IO
N
P
R
O
C
E
S
S
IN
G
O
U
TP
U
T
H
A
R
D
-C
O
P
Y
P
U
R
G
E
S
Y
S
IN
S
Y
S
O
U
T
S
Y
S
O
U
T
N
etw
orkjobentry
(N
JE
)
JC
L
JC
L&S
Y
S
IN
28
S
P
O
O
L
D
IS
K
© 2006 IBM Corporation
Chapter 07 Batch and JES
Benefits of JES systems and Sysout printing
Fewer Printers needed – Sysout provides virtual
printers
Printers run faster – JES create channel programs
that “batch” print operations
Printers more efficient – Don't wait for application to
generate next message
Jobs execute faster – Virtual printers run at memory
speed (block msgs into spool buffers)
CPUs more efficient – Fewer IO interrupts because of
“batch” print operations
29
© 2006 IBM Corporation
Chapter 07 Batch and JES
JES2 compared to JES3
In a multi-processor configuration:
JES2:
– Each JES2 processor controls its own job input, job scheduling,
and job output processing.
– It is possible to configure JES2 to share spool and checkpoint
data sets with other JES2 systems (multi-access spool or MAS).
JES3:
– Centralized control over processing through a single global JES3
processor, which does job selection, scheduling, and device
allocation the other JES3 systems.
– The centralized control of JES3 provides increased job
scheduling control, deadline scheduling capabilities, and by
providing its own device allocation.
Most installations use JES2, as do the examples in this text.
30
© 2006 IBM Corporation
Chapter 07 Batch and JES
What is workload manager?
Workload manager (WLM):
The component of z/OS that manages the
processing of workload in the system according to
the company’s business goals, such as response
time.
Also manages the use of system resources, such
as processors and storage, to accomplish these
goals.
31
© 2006 IBM Corporation
Chapter 07 Batch and JES
Summary
Batch processing is a fundamental function of
z/OS.
z/OS shares with JES the management of jobs and
resources.
JES receives jobs into the system, schedules them
for processing, and controls their output.
JES manages jobs in queues.
An initiator sets up the necessary environment for
running a batch job. Multiple initiators permit the
parallel execution of batch jobs.
During the life of a job, both JES and the z/OS base
control program control different phases of the
overall processing.
32
© 2006 IBM Corporation