Introduction to the new mainframe © Copyright IBM Corp., 2006. All rights reserved. Batch...

44
Introduction to the new mainframe © Copyright IBM Corp., 2006. All rights reserved. Batch processing the Job Entry Subsystem (JES) and WLM

Transcript of Introduction to the new mainframe © Copyright IBM Corp., 2006. All rights reserved. Batch...

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

Introduction to the new mainframe

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

Batch processing the Job Entry Subsystem (JES) and WLM

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

Introduction to the new mainframe

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

Chapter 7 objectives

To gain a basic understanding of• batch processing and how work is initiated and managed in the system.• 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., 2006. All rights reserved. Batch processing the Job Entry Subsystem (JES) and WLM.

Introduction to the new mainframe

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

Key terms in this chapter

• batch processing• DD name• initiator• job• job control language (JCL)• job entry subsystem (JES)• spool• workload manager (WLM)

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

Introduction to the new mainframe

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

What is batch processing?

Much of the work running on z/OS consists of tasks 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., 2006. All rights reserved. Batch processing the Job Entry Subsystem (JES) and WLM.

Introduction to the new mainframe

© Copyright IBM Corp., 2006. 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 • Schedules jobs for processing• Accepts output from the job while it runs• Decides what to do with the output when the job ends

z/OS has two types: JES2 and JES3

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

Introduction to the new mainframe

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

JES FUNCTIONS

z/OS

Job

JES

input outputJobScheduler

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

Introduction to the new mainframe

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

Initiators

Initiator- Allocation- Execution- Cleanup

JOBs

JES Processing

JES

SPOOLSPOOL

InitiatorAllocationsubmit

Printer

ExecutionCleanup

If there are 10 initiators then 10 batch jobs can run concurrently.

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

Introduction to the new mainframe

© Copyright IBM Corp., 2006. 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 any operating system.

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

Introduction to the new mainframe

© Copyright IBM Corp., 2006. 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 10: Introduction to the new mainframe © Copyright IBM Corp., 2006. All rights reserved. Batch processing the Job Entry Subsystem (JES) and WLM.

Introduction to the new mainframe

© Copyright IBM Corp., 2006. 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

ani

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

Introduction to the new mainframe

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

File names versus dataset names

A z/OS program uses a symbolic file name to refer to data,

rather than the actual data set name.

The file name is up to 8 characters.

It is also known as the DD name.

The data set name is up to 44 characters.

It is also known as the DS name.

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

Introduction to the new mainframe

© Copyright IBM Corp., 2006. 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=MY.PAYROLL MY.PAYROLL

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

Introduction to the new mainframe

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

How a symbolic file system is used (continued)

OPEN FILE=XYZREAD FILE=XYZ

...CLOSE FILE=XYZ

program

DDNAME

JCL for JOB

DSNAME

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

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

Introduction to the new mainframe

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

A job with two stepsFirst step: back up

SystemUtility

Backup

Updates

Program

Report

old Master

new Master

Master

Second step: process

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

Introduction to the new mainframe

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

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

your program needs.

The next module covers JCL is covered in detail.

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

Introduction to the new mainframe

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

Job and Output classes

Jobs have a class (A – Z, 0 – 9). The job class determines• which initiators can run the job• what resources the job can have• what procedure libraries the job will use

There is also an output class (A – Z, 0 – 9).This determines how JES will handle output. For example• printed• discarded• kept

Queuing is “usually” FIFO within class.

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

Introduction to the new mainframe

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

COMMAND INPUT ===> NP ID Status Classes JobName StepName ProcStep JobID C 1 ACTIVE A CAESTART *OMVSEX JOB09317 A 2 ACTIVE BA APPLY ASNA81 JOB00029 B 3 INACTIVE CBA 4 INACTIVE DCBA 5 INACTIVE DCBA 6 INACTIVE DCBA 7 INACTIVE DCBA 8 INACTIVE DCBA 9 INACTIVE DCBA 10 INACTIVE DCBA 11 ACTIVE I IMSAMSG1 DFSMPR REGION JOB02707 I 12 ACTIVE I IMSBMSG1 REGION JOB02743 I 13 ACTIVE I IMSBIFP1 DFSIVA4 IMS81 JOB02745 I 14 ACTIVE I IMSTMSG1 DFSMPR REGION JOB02799 I 15 INACTIVE T 16 INACTIVE A 17 INACTIVE A

Initiators and job classes

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

Introduction to the new mainframe

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

A Job

//JOBNAME JOB 'accounting data',// 'user name', // NOTIFY=&SYSUID.,// MSGCLASS=H,// MSGLEVEL=(1,1),// CLASS=A //STEP1 EXEC PGM=IEFBR14//SORTIN DD * NEPTUNEPLUTO…SATURNJUPITER/*//SORTOUT DD SYSOUT=*//

123456789

101112

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

Introduction to the new mainframe

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

Job output (1) J E S 2 J O B L O G -- S Y S T E M Z T 0 1 -

15.57.18 JOB02642 ---- MONDAY, 03 JUL 2006 ---- 15.57.18 JOB02642 IRR010I USERID AJRW IS ASSIGNED TO THIS JOB. 15.57.18 JOB02642 ICH70001I AJRW LAST ACCESS AT 10:39:22 ON MONDA15.57.18 JOB02642 £HASP373 SORT STARTED - INIT UA - CLASS A - S15.57.18 JOB02642 - --TIMINGS15.57.18 JOB02642 -JOBNAME STEPNAME PROCSTEP RC EXCP CPU 15.57.18 JOB02642 -SORT STEP1 00 9 .00 15.57.18 JOB02642 -SORT ENDED. NAME-user name TOTAL C15.57.18 JOB02642 £HASP395 SORT ENDED ------ JES2 JOB STATISTICS ------ 03 JUL 2006 JOB EXECUTION DATE 15 CARDS READ 39 SYSOUT PRINT RECORDS 0 SYSOUT PUNCH RECORDS 2 SYSOUT SPOOL KBYTES 0.00 MINUTES EXECUTION TIME

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

Introduction to the new mainframe

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

Job Output (2)

1 //SORT JOB 'accounting data',

// 'user name',

// NOTIFY=&SYSUID.,

// MSGCLASS=H,

// MSGLEVEL=(1,1),

// CLASS=A

IEFC653I SUBSTITUTION JCL - 'accounting data','user name',NOTIFY=AJRW,

2 //STEP1 EXEC PGM=IEFBR14

3 //SORTIN DD *

4 //SORTOUT DD SYSOUT=*

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

Introduction to the new mainframe

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

A job with two steps - revisited

//STEP1 EXEC PGM=IDCAMS

//SYSPRINT DD SYSOUT=*

//MASTER DD … DSN=master.file

//BACKUP DD … UNIT=TAPE,DSN=backup.file

//SYSIN DD *

REPRO INFILE(MASTER) OUTFILE(BACKUP)

// IF RC = 0 THEN

//STEP2 EXEC PGM=updatpgm

//STEPLIB DD … DSN=appl.load.library

//MASTER DD … DSN=master.file

//UPDATES DD … DSN=update.file

//REPORT DD SYSOUT=*

// ENDIF

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

Introduction to the new mainframe

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

JES itself has JCL

HASPPARM contains JES2 initialization statements PROC00 default procedure library to be used for converting JCLPROCxx other procedure library selected by job class

or /*JOBPARM PROCLIB=PROCxx

…//IEFPROC EXEC PGM=HASJES20,TIME=1440//HASPPARM DD … DSN=SYS1.PARMLIB(JES2PARM)…//PROC00 DD … DSN=SYS1.PROCLIB…//PROCxx DD … DSN=some.other.proclib…

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

Introduction to the new mainframe

© Copyright IBM Corp., 2006. 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 24: Introduction to the new mainframe © Copyright IBM Corp., 2006. All rights reserved. Batch processing the Job Entry Subsystem (JES) and WLM.

Introduction to the new mainframe

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

Phases of job flow: input

INPUT

JOB

CONVERSION PROCESSING HARD-COPY PURGE

CONVERSIONQUEUE

JCL & SYSIN

OUTPUT

SPOOLSPOOLDISKDISK

Internal readers (RDR)

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

Introduction to the new mainframe

© Copyright IBM Corp., 2006. 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 26: Introduction to the new mainframe © Copyright IBM Corp., 2006. All rights reserved. Batch processing the Job Entry Subsystem (JES) and WLM.

Introduction to the new mainframe

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

Phases of job flow: execution

INPUT

JOB

CONVERSION PROCESSING HARD-COPY PURGE

OUTPUTQUEUE

EXECUTIONQUEUE

SYSOUTSYSIN

OUTPUT

SPOOLSPOOLDISKDISK

Request Initiators - wlm

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

Introduction to the new mainframe

© Copyright IBM Corp., 2006. 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 28: Introduction to the new mainframe © Copyright IBM Corp., 2006. All rights reserved. Batch processing the Job Entry Subsystem (JES) and WLM.

Introduction to the new mainframe

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

Phases of job flow: purge

INPUT

JOB

CONVERSION PROCESSING HARD-COPY PURGE

PURGEQUEUE

OUTPUT

SPOOLSPOOLDISKDISK

Clears spool

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

Introduction to the new mainframe

© Copyright IBM Corp., 2006. 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 30: Introduction to the new mainframe © Copyright IBM Corp., 2006. All rights reserved. Batch processing the Job Entry Subsystem (JES) and WLM.

Introduction to the new mainframe

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

JES2 – Multi Access Spool Facility

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

Introduction to the new mainframe

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

JES2 compared to JES3In 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 increased control by providing its own device allocation.

Most installations use JES2, as do the examples in this text.

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

Introduction to the new mainframe

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

JES2 has many parts …..

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

Introduction to the new mainframe

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

37 Flavours of JES

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

Introduction to the new mainframe

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

JES2 Library (optional)

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

Introduction to the new mainframe

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

JES END

//

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

Introduction to the new mainframe

© Copyright IBM Corp., 2006. 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., 2006. All rights reserved. Batch processing the Job Entry Subsystem (JES) and WLM.

Introduction to the new mainframe

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

Workload Management Policy for different classes of users

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

Introduction to the new mainframe

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

ODI needed to 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., 2006. All rights reserved. Batch processing the Job Entry Subsystem (JES) and WLM.

Introduction to the new mainframe

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

Gold customerHigh Priority

Business PartnerHigh Priority

Customer careHigh Priority

(Business Hours)

Casual customerLow priorty

Data Analysis(Best can

do)

ClassificationRules

ServiceClass

New ODI Insrance Workload Policy

Response Time80% trx complete with0.5 seconds – (24x7) (Claims Trx Class)

Average Response TimeAll trx must complete witin

4 seconds – (18x5)(Policy Browser)

Average Response TimeAll trx must complete

within 2 secondsLoc: MA, NY, PA USA

A. Discretionary Response Time between 7:00 – 16:00B. Response Time percentile50% trx complete within 3 mins between 16:00 – 7:00

Response Time (8 x 5)A. South East = 0.8 SecsB. South West = 1.5 Secs.C. North West = 2.5 SecondsD Nort East = 2.5 Seconds

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

Introduction to the new mainframe

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

Recurring reporting, uses leftover cycles

JCL - Batch analysis for buying patterns

POS or Retail Biz transactions get fast track as a matter of policy

High Priority Transactions

Medium Priority Analysis

Low PriorityBatch

Policy Driven Real-Time Prioritization

Operates at High Levels of Utilization

L

P

A

R

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

Introduction to the new mainframe

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

ServerProcess

WLM provides for scaling of WebSphere Application Environments

Controller

ServerProcess

ServerProcess

ServerProcess

Gold customerHigh Priority

CLAIMSApplication

Business PartnerHigh Priority

ServerProcess

WLM

AE1

WLM

AE2

ManagerPolicy

Helps meet the goals of transactions by dynamically changing the number of servers on-demand

Does this without harming other, more

important workload on a system

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

Introduction to the new mainframe

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

z/OS: Prioritizing work across images in a server - IRD

"Intelligent Resource Director (IRD)" further differentiates z/OS with its ability to manage resources across multiple partitions in a server

PR/SM, IRD and WLM work together to ensure that the resources of the server are correctly balanced to enable work to complete within stated policy goals

Processor resources, data bandwidth and I/O queueing decisions are perfectly balanced across the server to manage diverse workloads within the parameters of stated business goals

z9 zSeries

z/VM z/OS z/OS z/OS

Lin

ux

ProductionWASDB2CICS

ProductionWASDB2CICS

Test &Batch

Low Priority

MORE

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

Introduction to the new mainframe

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

Summary

• Batch processing is a fundamental function of z/OS. • A program can access different files in different jobs by

changing the JCL for each job. • JES receives jobs into the system, schedules them for

processing, and controls their output. • Multiple initiators permit the parallel execution of batch

jobs.• JES and z/OS control different phases of a job’s

processing. • WLM manages large commercial workloads

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

Introduction to the new mainframe

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

Key terms in this chapter

• batch processing• DD name• initiator• job• job control language (JCL)• job entry subsystem (JES)• spool• workload manager (WLM)