Introduction to the new mainframe © Copyright IBM Corp., 2006. All rights reserved. Batch...
-
Upload
nikolas-trone -
Category
Documents
-
view
229 -
download
0
Transcript of Introduction to the new mainframe © Copyright IBM Corp., 2006. All rights reserved. Batch...
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
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)
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.
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
Introduction to the new mainframe
© Copyright IBM Corp., 2006. All rights reserved.
JES FUNCTIONS
z/OS
Job
JES
input outputJobScheduler
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.
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.
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)
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
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.
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
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
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
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.
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.
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
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
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
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=*
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
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…
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
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)
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
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
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
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
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
Introduction to the new mainframe
© Copyright IBM Corp., 2006. All rights reserved.
JES2 – Multi Access Spool Facility
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.
Introduction to the new mainframe
© Copyright IBM Corp., 2006. All rights reserved.
JES2 has many parts …..
Introduction to the new mainframe
© Copyright IBM Corp., 2006. All rights reserved.
37 Flavours of JES
Introduction to the new mainframe
© Copyright IBM Corp., 2006. All rights reserved.
JES2 Library (optional)
Introduction to the new mainframe
© Copyright IBM Corp., 2006. All rights reserved.
JES END
//
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.
Introduction to the new mainframe
© Copyright IBM Corp., 2006. All rights reserved.
Workload Management Policy for different classes of users
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
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
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
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
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
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
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)