Top Banner
Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch processing and JES [email protected]
39

Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Dec 15, 2015

Download

Documents

Jadyn Cure
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Chapter 9: Batch processing and the Job Entry Subsystem (JES)

Batch processing and JES

[email protected]

Page 2: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

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.• Workload Manager

Page 3: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Key terms in this chapter

•batch processing•execution•initiator•job•job entry subsystem (JES)•output

•procedure• purge• queue• spool• symbolic reference• workload manager (WLM)

Page 4: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

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:• With minimal human interaction• At a scheduled time or on an as-needed basis.

After a batch job is submitted to the system for execution, there is normally no further human interaction with the job until it is complete.

Page 5: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

//S1 EXEC PGM=MVSPROG1

//S3 EXEC PGM=MVSPROG2

//S2 EXEC PGM=BPXBATCH,

//OPENBATC JOB

/*//

// PARM='pgm cprog a1 a2'

MVS batch program

OpenMVS batch program

MVS batch program

End of job

Start of job

MVS Batch Job Stream

CLASS=?

IMPORTANT Parameter

Page 6: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Batchjob

STEP

1ST

EP2

STEP

n

Batchjob

STEP

1ST

EP2

STEP

n

STEP

1ST

EP2

STEP

n

Example of Batch Processing

Batchjob

STEP

1ST

EP2

STEP

n

Batchjob

STEP

1ST

EP2

STEP

n

Batchjob

STEP

1ST

EP2

STEP

n

Page 7: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

What is JES?

• In the z/OS operating system, JES manages the input and output job queues and data.

• JES handles the following aspects of batch processing for z/OS:• Receives jobs into the operating system• Schedules them for processing by z/OS• Controls their output processing

Page 8: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

What is JES? (continued)

z/OS offers two types: JES2 and JES3Some important differences, but both JES2 and JES3:

• Accept and queue jobs submitted for execution• Queue jobs for an initiator -- a JES 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.

Page 9: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Job Management

Page 10: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Why do we need JES

Page 11: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

JES FUNCTIONS

Page 12: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

BATCH

Jobstreamss# = step number

s1 s2 s3S4 s5 s6 s7

s1s2s3s4

s1 s2 s3 s4 s5

s1s2s3s4s5

AutomatedScheduler

Page 13: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Batch flow (simplified)

Initiator- Allocation- Execution- Cleanup

JOBs

JCL Processing

JES

SPOOLSPOOL

Initiator- Allocation- Execution- Cleanup

submit

Printer

i.e – 10 initiators = 10 batch jobs can run concurrently.

Page 14: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

JES2 Queuing Mechanisms

Page 15: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

JES2 has many parts …..

Page 16: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Sample JES2 Start Procedure

PROC00 – default procedure library to be used for converting the JCLPROCxx - other user catalogue procedures lib associated with JOBCLASS initialization HASPPARM – Dataset containing intialization statements that will be used for JES2 initialization and conrolling all JES functions

Page 17: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

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.

(Simultaneous Peripheral Operations OnLine)

Page 18: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

JES2 Spool Dataset

-$DSPOOL $HASP893 VOLUME(DMPSP1) STATUS=ACTIVE,PERCENT=29 $HASP893 VOLUME(DMPSP2) STATUS=ACTIVE,PERCENT=61 $HASP646 39.7666 PERCENT SPOOL UTILIZATION ******************************* BOTTOM OF DATA ******

SDSF.ULOG

Direct Access Devices containing the spool datasets

Page 19: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

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

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.

Page 20: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Display Filter View Print Options Help

_______________________________ __________________________________________

SDSF INITIATOR DISPLAY DEMOMVS LINE 1-17 (24)

COMMAND INPUT ===> SCROLL ===> PAGE

NP ID Status Classes JobName StepName ProcStep JobID C ASID ASIDX

1 ACTIVE A CAESTART *OMVSEX JOB09317 A 233 00E

2 ACTIVE BA APPLY ASNA81 JOB00029 A 42 002

3 INACTIVE CBA 43 002

4 INACTIVE DCBA 44 002

5 INACTIVE DCBA 45 002

6 INACTIVE DCBA 46 002

7 INACTIVE DCBA 47 002

8 INACTIVE DCBA 48 003

9 INACTIVE DCBA 49 003

10 INACTIVE DCBA 50 003

11 ACTIVE I IMSAMSG1 DFSMPR REGION JOB02707 I 51 003

12 ACTIVE I IMSBMSG1 REGION JOB02743 I 52 003

13 ACTIVE I IMSBIFP1 DFSIVA4 IMS81 JOB02745 I 53 003

14 ACTIVE I IMSTMSG1 DFSMPR REGION JOB02799 I 54 003

15 INACTIVE T 55 003

16 INACTIVE A 56 003

17 INACTIVE A 57 003

F1=HELP F2=SPLIT F3=END F4=RETURN F5=IFIND F6=BOOK

F7=UP F8=DOWN F9=SWAP F10=LEFT F11=RIGHT F12=RETRIEVE

SDSF.INIT

/D $DI/D $SPOOL

Page 21: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

SDSF.ULOG /$D I

Display Filter View Print Options Help ------------------------------------------------------------------------------ SDSF ULOG CONSOLE DNET855 LINE 0 COLUMNS 42- 121 COMMAND INPUT ===> SCROLL ===> PAGE********************************* TOP OF DATA *********************************

ISF031I CONSOLE DNET855 ACTIVATED -$DI $HASP892 INIT(1) $HASP892 INIT(1) STATUS=ACTIVE,CLASS=A,NAME=1, $HASP892 ASID=00E9,JOBID=JOB09317 $HASP892 INIT(2) $HASP892 INIT(2) STATUS=ACTIVE,CLASS=BA,NAME=2, $HASP892 ASID=002A,JOBID=JOB00029 $HASP892 INIT(3) $HASP892 INIT(3) STATUS=INACTIVE,CLASS=CBA,NAME=3, $HASP892 ASID=002B $HASP892 INIT(4) $HASP892 INIT(4) STATUS=INACTIVE,CLASS=DCBA,NAME=4, $HASP892 ASID=002C $HASP892 INIT(5) $HASP892 INIT(5) STATUS=INACTIVE,CLASS=DCBA,NAME=5, $HASP892 ASID=002D

/$D I

Page 22: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Symbolic references to files

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.

Page 23: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

How a symbolic file system is used

OPEN FILE=XYZREAD FILE=XYZ

...CLOSE FILE=XYZ

program

DDNAME

JCL for JOB

DSNAME

//XYZ DD DSNAME=DIV1.PAYROLL DIV1.PAYROLL

Page 24: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

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.

Page 25: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Spooling

spool

33

program

SYSOUT

write

22read

JCL

//DD1 DD *

/*

//DD2 DD SYSOUT=A

……...............

data……...............

//DD1 DD *

/*

//DD2 DD SYSOUT=A

……...............

data……...............

//DD1 DD *

/*

//DD2 DD SYSOUT=A

……...............

data……...............

11JES

Printer

44JES

Page 26: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Two-step job

First step

Program

Tape

Updates

Program

Printer

Master

Master

Master

Second step

Page 27: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

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

Page 28: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Phases of job flow: input

INPUT

JOB

CONVERSION PROCESSING HARD-COPY PURGE

CONVERSIONQUEUE

JCL & SYSIN

OUTPUT

SPOOLSPOOLDISKDISK

Internal readers (RDR)

Page 29: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Phases of job flow: conversion

INPUT

JOB

CONVERSION PROCESSING HARD-COPY PURGE

EXECUTIONQUEUE

CONVERSIONQUEUE

JCL

OUTPUT

SPOOLSPOOLDISKDISK

Merge w/ Proc Libs

Page 30: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Phases of job flow: execution

INPUT

JOB

CONVERSION PROCESSING HARD-COPY PURGE

OUTPUTQUEUE

EXECUTIONQUEUE

SYSOUTSYSIN

OUTPUT

SPOOLSPOOLDISKDISK

Request Initiators - wlm

Page 31: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Phases of job flow: output and hardcopy

INPUT

JOB

CONVERSION PROCESSING HARD-COPY PURGE

PURGEQUEUE

HARD-COPYQUEUE

OUTPUTQUEUE

NON-PRINT/PUNCHOUTPUT

OUTPUT

SPOOLSPOOLDISKDISK

SYSOUT

Sysout dsn processing - classes

Page 32: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Phases of job flow: purge

INPUT

JOB

CONVERSION PROCESSING HARD-COPY PURGE

PURGEQUEUE

OUTPUT

SPOOLSPOOLDISKDISK

Clears spool

Page 33: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Job flow through the system

INPUT

JOB

CONVERSION PROCESSING HARD-COPY PURGE

PURGEQUEUE

HARD-COPYQUEUE

OUTPUTQUEUE

EXECUTIONQUEUE

CONVERSIONQUEUE

SYSOUTSYSIN

JCL

JCL & SYSIN

Network job entry (NJE)

OUTPUT

SPOOLSPOOLDISKDISK

SYSOUT

Overall Flow

Page 34: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Batch and Job Submission

Page 35: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

JES END

/*//

Page 36: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

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.

Page 37: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Workload Management Policy for different classes of users

Page 38: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

Segregate different classes of uses

Casual customerLow priority

Gold customerHigh Priority

Customer careHigh Priority

(Business Hours)

Data Analysis(Best can

do)

Business PartnerHigh Priority

OD Insurance SLA

Highest (1) = Gold Customer

High (2) Customer Care

Medium (3) Business Partner

Low (4) Casual Customer

Lowest (5) Data Analysis

Page 39: Introduction to the new mainframe © Copyright IBM Corp., 2008. All rights reserved. Chapter 9: Batch processing and the Job Entry Subsystem (JES) Batch.

Introduction to the new mainframe

© Copyright IBM Corp., 2008. All rights reserved.

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.