Professional Documents
Culture Documents
Day 1
Course Plan
Day 1 :
Introduction to JCL, JOB & EXEC statement , JES commands DD statements, JCL Procedures & IBM Utilities
Day 2 :
Day 3 :
Pre-requisites
MVS Operating system and its subsystem TSO Navigating through ISPF
Evaluation Mechanism
Component Test
Marks 100
References
Title
OS/390 and z/OS JCL MVS JCL MVS/VSAM IBM Online manuals
Author
Raul Menendez
Publisher
Murach
JOB
CONTROL
LANGUAGE
Why JCL?
Sample JCL code
Sample JCL
//UseridJ JOB ,,NOTIFY=&SYSUID,CLASS=D, // MSGLEVEL=(1,1),MSGCLASS=X //* SAMPLE JCL //STEP1 EXEC PGM=SEQPROC //STEPLIB DD DSN=OPERN.CICS3.LOADLIB,DISP=SHR //SYSPRINT DD SYSOUT=* //INFILE DD DSN=YourMainframeId.JCL.DAY2.FILE1,DISP=SHR //OUTFILE DD DSN=YourMainframeId.JCL.DAY2.FILE2, // DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA,SPACE=(TRK,(10,5),RLSE), // DCB=(LRECL=80,BLKSIZE=8000,RECFM=FB)
System Messages
User Views and Copyright 2005, # Interprets Infosys Technologies Ltd output
JES collects the output and information about ER/CORP/CRS/OS02/003 the JOB Version No: 1.0
INPUT
MVS JES
INPUT
SPOOL
JCL SYSIN
CONVERSION
MVS JES
PROCLIB
SPOOL
JCL SYSIN
PROC
CONVERSION
CONVERSION
Execution: JES selects a job for execution , based upon job CLASS and job selection PRTY
Ex: //ER5077 JOB ,,PRTY=8,CLASS=A Allocation of datasets SYSIN and SYSOUT OUTPUT, HARDCOPY and PURGE
JCL PROCESSING
SPOOL
JCL
SYSIN SYSOUT
PRINTER
JES2 / JES3
INITIATOR1
INITIATOR3 INITIATOR2
JCL execution
JCL INITIATION
STEP INITIATION
PROGRAM EXECUTION
STEP TERMINATION
JOB TERMINATION
QUESTIONS ???
JCL is used to write an application program ? Yes/No What are the different stages of JCL processing ?
JCL statements
JOB - Job Identification EXEC - Instruction for Execution DD - Source of data to operate
JOB STATEMENT
All these parameters are optional as far as JCL is concerned, they are probably required by your installation.
CLASS specifies the job class that is the nature of the job. Installation will specify which of the 36 possible classes to use which is from A to Z and 0 to 9 . Installation establishes a default class that is in effect if CLASS is omitted.
Class A
B
C
D
H L T
Execute Overnight
Will be held until released by operator Execute within 15 min of submission Requires Tape Processing
Requests the system sends a message to the TSO user id specified when the job completes processing
TYPRUN = HOLD holds the JCL in the input queue for later execution.It is held until the operator releases it.
TYPRUN = JCLHOLD(JES2 only) similar to HOLD but the difference is it is checked while it is not with the HOLD option. TYPRUN = COPY(JES2 only) lists or duplicates the lines placed in the JOB statement to the class assigned in the MSGCLASS parameter and suppresses execution.
Copyright 2005, # Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0
PRTY=Priority : is related to the CLASS parameter. It assigns priority to jobs which belong to the same class.priority numbers range from (0-14) or (0-15) depending on installations.
TIME=(min,sec) : signifies how much CPU time the JOB can take to run.
ADDRSPC=REAL : It is used to specify whether the program is to use REAL or VIRTual ADDRess SPaCe. Default is Virtual. If Real is coded then the REGION parameter is also to be coded. REGION=96K :To override the default amount of workspace assigned for the job.
COND=(4,LT) :Permits the execution of a steps to depend on the return code from the previous steps.
EXEC STATEMENTS
The PROC parameter identifies the name of the procedure that is to be called.
EX:
The ADDRSPC parameter is to indicate to the system that the job step is to use either VIRT (virtual) or REAL (real) storage.
By default it is virtual.
The question should be is 8 less than the RC code of STEP1. If Yes then Bypass STEP3 If No Execute STEP3 The COND parameter is also a JOB parameter.
Format :
COND=( 0/4/6/8/12/16 , GT/GE/LT/LE/EQ/NE , step name , EVEN/ONLY ) RC comparison Condition code (0 - 4095) EVEN : step will be executed even if previous steps terminate abnormally ONLY : step will be executed only if previous steps terminate abnormally.
Copyright 2005, # Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0
STEP1 executes with RC = 0 STEP2 executes with RC *S806 that is it is greater than 4 Job terminates
Copyright 2005, # Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0
//ER5077J JOB ,,CLASS=A //STEP1 EXEC PGM=IFBR14 //STEP2 EXEC PGM=IEFBR14 //STEP3 EXEC PGM=IEFBR14,COND=ONLY
STEP1 abends with RC = *S806 STEP2 does not execute ( if a single step abends all other steps are bypassed if no COND statement is there ) STEP3 executes with RC = 0
Copyright 2005, # Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0
ACCT
PRIORITY or PRTY -Assign a selection priority for your job. Within a job class, a job with a higher priority is selected for execution sooner.
Errors
JCL syntax errors. JOB will not be submitted JCL allocation errors. JES2-subsequent steps will not get executed. JES3-detects errors in the beginning.
Abend Failures
An ABEND failure occurs under the following conditions: A program while executing, attempts to perform an instruction or operation which the system recognizes as being impossible or unacceptable.
Logic error Resource unavailability Exceeding limits (Time or Space on DASD) Hardware Malfunction User ABENDS Operator intervention Operating System failure
Thank You!
Copyright 2005, # Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0