SlideShare a Scribd company logo
Introduction to the new mainframe 
Chapter 6: Using Job Control Language (JCL) and System 
Display and Search Facility (SDSF) 
© Copyright IBM Corp., 2005. All rights reserved.
Introduction to the new mainframe 
–Presentation On Mainframes 
–Kamal Singh Dhakar 
–kamalsgsits@gmail.com 
© Copyright IBM Corp., 2005. All rights reserved.
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
Chapter 6 objectives 
Be able to: 
• Explain how JCL works with the 
system, give an overview of JCL 
coding techniques, and know a few 
of the more important statements 
and keywords 
• Create a simple job and submit it 
for execution 
• Check the output of your job 
through SDSF
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
Key terms in this chapter 
• concatenation 
• DD statement 
• job control language 
(JCL) 
• JOB statement 
• EXEC statement 
• job name 
• procedure (PROC) 
• record format (RECFM) 
• system display and search 
facility (SDSF) 
• step name 
• system catalog 
• system library 
• utility
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
What is JCL? 
Job control language (JCL) tells the system what 
program to execute and provides a description of 
program inputs and outputs. 
There are three basic JCL statements: 
• JOB statement 
• EXEC statement 
• DD statement
Introduction to the new mainframe 
JCL must be uppercase 
Forward slash in column 1 and 2 
Name (1-8 characters) follow the slashes 
Space separators 
© Copyright IBM Corp., 2005. All rights reserved. 
Basic JCL coding syntax 
//JOBNAME JOB 
//STEPNAME EXEC 
//DDNAME DD 
//* comment - upper or lower case 
/* ....end of JCL stream
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
JCL example 
//MYJOB JOB 1 
//MYSORT EXEC PGM=SORT 
//SORTIN DD DISP=SHR,DSN=IBMUSER.AREA.CODES 
//SORTOUT DD SYSOUT=* 
//SYSOUT DD SYSOUT=* 
//SYSIN DD * 
SORT FIELDS=(1,3,CH,A) 
/*
Introduction to the new mainframe 
In the preceding example… 
MYJOB Job name 
MYSORT Step name 
SORTIN DD name for program input 
SORTOUT DD name for program output 
SYSOUT Where to send system output 
messages (such as a data set) 
SYSIN Specifies whether the input will 
be data or control statements. 
© Copyright IBM Corp., 2005. All rights reserved.
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
JCL: JOB statement 
Create a member using ISPF edit 
Create JCL statements 
JOB statement 
Accounting information 
Execution classes
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
JCL: EXEC statement 
EXEC statement 
Region size
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
JCL: DD statement 
DD statement 
DD name (referenced in the program) 
DSN= (the data set name as cataloged on disk)
Introduction to the new mainframe 
Specifying a data set disposition: 
DISP is an operand of the DD statement 
DISP indicates what to do with the data set (the disposition) 
at step start, end, or abnormal end (if the job fails) 
DISP helps to prevent unwanted simultaneous access to 
data sets, which is very important for general system 
operation. 
© Copyright IBM Corp., 2005. All rights reserved.
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
Uses of the DISP= operand 
DISP=(status,normal end,abnormal end) 
DISP=(status,normal end) 
DISP=status 
where status can be 
• NEW 
• OLD 
• SHR 
• MOD
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
Creating a new data set 
New data sets can be created through JCL by using the DISP=NEW 
parameter. 
For a DISP=NEW request, you need to supply more information, 
including: 
• A data set name, DSN= 
• The type of device for the data set, UNIT=sysda 
• If a disk is used, the amount of space to be allocated for the 
primary extent must be specified, SPACE= 
• If it is a partitioned data set, the size of the directory must be 
specified within the SPACE parameter 
• Optionally, DCB parameters can be specified.
Introduction to the new mainframe 
Continuation and concatenation 
Needed to overcome the limitations of the 80-column 
punched cards used in earlier systems. 
• Continuation allows a JCL statement to span multiple records. 
• Concatenation allows a single ddname to have multiple DD 
© Copyright IBM Corp., 2005. All rights reserved. 
statements.
Introduction to the new mainframe 
Continuation and concatenation (example) 
Continuation example 
© Copyright IBM Corp., 2005. All rights reserved. 
//JOBCARD JOB 1, 
// REGION=8M, 
// NOTIFY=IBMUSER 
Concatenation example 
//DATAIN DD DISP=OLD,DSN=MY.INPUT1 
// DD DISP=OLD,DSN=MY.INPUT2 
// DD DISP=SHR,DSN=YOUR.DATA
Introduction to the new mainframe 
JCL procedures - example 
//MYJOB JOB 1 
//MYPROC PROC 
//MYSORT EXEC PGM=SORT 
//SORTIN DD DISP=SHR,DSN=&SORTDSN 
//SORTOUT DD SYSOUT=* 
//SYSOUT DD SYSOUT=* 
// PEND 
© Copyright IBM Corp., 2005. All rights reserved.
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
JCL procedures (continued) 
//MYJOB JOB 1 
//*---------------------------------* 
//MYPROC PROC 
//MYSORT EXEC PGM=SORT 
//SORTIN DD DISP=SHR,DSN=&SORTDSN 
//SORTOUT DD SYSOUT=* 
//SYSOUT DD SYSOUT=* 
// PEND 
//*---------------------------------* 
//STEP1 EXEC MYPROC,SORTDSN=IBMUSER.AREA.CODES 
//SYSIN DD * 
SORT FIELDS=(1,3,CH,A)
Introduction to the new mainframe 
JCL procedures -- statement override 
//MYJOB JOB 1 
//*---------------------------------* 
//MYPROC PROC 
//MYSORT EXEC PGM=SORT 
//SORTIN DD DISP=SHR,DSN=&SORTDSN 
//SORTOUT DD SYSOUT=* 
//SYSOUT DD SYSOUT=* 
// PEND 
//*---------------------------------* 
//STEP1 EXEC MYPROC,SORTDSN=IBMUSER.AREA.CODES 
//MYSORT.SORTOUT DD DSN=IBMUSER.MYSORT.OUTPUT, 
// DISP=(NEW,CATLG),SPACE=(CYL,(1,1)), 
// UNIT=SYSDA,VOL=SER=SHARED, 
// DCB=(LRECL=20,BLKSIZE=0,RECFM=FB,DSORG=PS) 
//SYSIN DD * 
© Copyright IBM Corp., 2005. All rights reserved. 
SORT FIELDS=(1,3,CH,A)
Introduction to the new mainframe 
Using SDSF 
After submitting a job, z/OS users use System Display and Search 
Facility (SDSF) to review the job output for successful completion or 
JCL errors. 
© Copyright IBM Corp., 2005. All rights reserved. 
SDSF allows users to: 
• View and search the system log 
• Enter system commands 
• Hold, release, cancel, and purge jobs 
• Monitor jobs while they are processed 
• Display job output before deciding to print it 
• Control the order in which jobs are processed 
• Control the order in which output is printed 
• Control printers and initiators
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
SDSF panel hierarchy
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
SDSF: Primary option menu
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
SDSF: Options menu
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
Viewing the JES2 output files 
Screen 1 
Screen 2
Introduction to the new mainframe 
SDSF: Display active users (DA) 
© Copyright IBM Corp., 2005. All rights reserved. 
Display Filter View Print Options Help 
----------------------------------------------------------------------------- 
SDSF DA SC67 SC67 PAG 0 SIO 7 CPU 6/ 7 LINE 1-25 (64) 
COMMAND INPUT ===> SCROLL ===> PAG 
PREFIX=* DEST=LOCAL OWNER=* SORT=JOBNAME/A 
NP JOBNAME STEPNAME PROCSTEP JOBID OWNER C POS DP REAL PAGING SIO 
*MASTER* STC06373 +MASTER+ NS FF 1369 0.00 0.00 
ALLOCAS ALLOCAS NS FF 190 0.00 0.00 
ANTAS000 ANTAS000 IEFPROC NS FE 1216 0.00 0.00 
ANTMAIN ANTMAIN IEFPROC NS FF 4541 0.00 0.00 
APPC APPC APPC NS FE 2653 0.00 0.00 
ASCH ASCH ASCH NS FE 267 0.00 0.00 
BPXOINIT BPXOINIT BPXOINIT LO FF 315 0.00 0.00 
CATALOG CATALOG IEFPROC NS FF 1246 0.00 0.00 
CICSPAAY CICSPAAY CICS520 STC06504 STC NS FE 4330 0.00 0.00 
CONSOLE CONSOLE NS FF 597 0.00 0.00 
DFRMM DFRMM IEFPROC STC06363 STC NS FE 510 0.00 0.00 
DFSMSHSM HSMSC67 DFSMSHSM STC13178 STC NS FE 6199 0.00 0.00 
DUMPSRV DUMPSRV DUMPSRV NS FF 160 0.00 0.00 
FTPDMVS1 STEP1 STC06477 STC LO FF 470 0.00 0.00 
FTPDOE1 STEP1 STC06475 FTPDOE LO FF 469 0.00 0.00 
GRS GRS NS FF 894 0.00 0.00 
IEFSCHAS IEFSCHAS NS FF 25 0.00 0.00 
IMWEBSUF IMWEBSUF WEBSRV STC15245 WEBSRV IN FE 15T 0.00 0.00
Introduction to the new mainframe 
Issuing MVS and JES commands 
© Copyright IBM Corp., 2005. All rights reserved.
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
SDSF: Input queue panel
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
SDSF: Output queue panel
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
SDSF: Held output queue panel
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
SDSF: Status panel
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
Utilities 
• z/OS includes a number of programs useful in 
batch processing called utilities. 
• Utilities provide many small, obvious, and useful 
functions. 
• A basic set of system-provided utilities is 
described in the textbook (Appendix C). 
• Customer sites often write their own utility 
programs, many of which are shared by the z/OS 
user community. 
• Some examples of utilities: 
• IEBGENER Copies a sequential data set 
• IEBCOPY Copies a partitioned data set 
• IDCAMS Works with VSAM data sets
Introduction to the new mainframe 
System Libraries 
z/OS has many standard system libraries, including: 
• SYS1.PROCLIB JCL procedures distributed 
© Copyright IBM Corp., 2005. All rights reserved. 
with z/OS 
• SYS1.PARMLIB Control parameters for z/OS 
and some program products. 
• SYS1.LINKLIB Many of the basic execution 
modules of the system. 
• SYS1.LPALIB System execution modules 
that are loaded into the link 
pack area at z/OS initialization.
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
Summary 
• Basic JCL contains three statements: JOB, EXEC, and 
DD. 
• A program can access different groups of data sets in 
different jobs by changing the JCL for each job. 
• New data sets can be created through JCL by using 
the DISP=NEW parameter. 
• Users normally use JCL procedures for more complex 
jobs. A cataloged procedure is written once and can 
then be used by many users. 
• z/OS supplies many JCL procedures, and locally-written 
ones can be added easily. 
• A user must understand how to override or extend 
statements in a JCL procedure to supply the 
parameters (usually DD statements) needed for a 
specific job.
Introduction to the new mainframe 
© Copyright IBM Corp., 2005. All rights reserved. 
Summary - continued 
• SDSF is a panel interface for viewing the system log 
and the list of active users and controlling and 
monitoring jobs and resources. 
• Utility programs make operating on data sets easier 
• System libraries contain JCL procedures, control 
parameters, and system execution modules.

More Related Content

What's hot

JCL FOR FRESHERS
JCL FOR FRESHERSJCL FOR FRESHERS
JCL FOR FRESHERS
Nirmal Pati
 
Introduction of ISPF
Introduction of ISPFIntroduction of ISPF
Introduction of ISPF
Anil Bharti
 
Z OS IBM Utilities
Z OS IBM UtilitiesZ OS IBM Utilities
Z OS IBM Utilities
kapa rohit
 
Ipl process
Ipl processIpl process
Jcl
JclJcl
Jcl
shivas
 
Mvs commands
Mvs commandsMvs commands
JCL UTILITIES IEBCOPY
JCL UTILITIES IEBCOPYJCL UTILITIES IEBCOPY
JCL UTILITIES IEBCOPY
janaki ram
 
Mainframe jcl exec and dd statements part - 3
Mainframe jcl exec and dd statements part - 3Mainframe jcl exec and dd statements part - 3
Mainframe jcl exec and dd statements part - 3
janaki ram
 
IBM Utilities
IBM UtilitiesIBM Utilities
IBM Utilities
Anil Bharti
 
Mainframe - OPC
Mainframe -  OPCMainframe -  OPC
Mainframe - OPC
Srinimf-Slides
 
Resource Access Control Facility (RACF) in Mainframes
Resource Access Control Facility (RACF) in MainframesResource Access Control Facility (RACF) in Mainframes
Resource Access Control Facility (RACF) in Mainframes
Aayush Singh
 
20 DFSORT Tricks For Zos Users - Interview Questions
20 DFSORT Tricks For Zos Users - Interview Questions20 DFSORT Tricks For Zos Users - Interview Questions
20 DFSORT Tricks For Zos Users - Interview Questions
Srinimf-Slides
 
Smpe
SmpeSmpe
100 COOL MAINFRAME TIPS
100 COOL MAINFRAME TIPS100 COOL MAINFRAME TIPS
100 COOL MAINFRAME TIPS
Nirmal Pati
 
IMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialIMS DC Self Study Complete Tutorial
IMS DC Self Study Complete Tutorial
Srinimf-Slides
 
DB2 utilities
DB2 utilitiesDB2 utilities
DB2 utilities
Udayakumar Suseendran
 
Z4R: Intro to Storage and DFSMS for z/OS
Z4R: Intro to Storage and DFSMS for z/OSZ4R: Intro to Storage and DFSMS for z/OS
Z4R: Intro to Storage and DFSMS for z/OS
Tony Pearson
 
Top jcl interview questions and answers job interview tips
Top jcl interview questions and answers job interview tipsTop jcl interview questions and answers job interview tips
Top jcl interview questions and answers job interview tips
jcltutorial
 
RACF - The Basics (v1.2)
RACF - The Basics (v1.2)RACF - The Basics (v1.2)
RACF - The Basics (v1.2)
Rui Miguel Feio
 
Vsam
VsamVsam

What's hot (20)

JCL FOR FRESHERS
JCL FOR FRESHERSJCL FOR FRESHERS
JCL FOR FRESHERS
 
Introduction of ISPF
Introduction of ISPFIntroduction of ISPF
Introduction of ISPF
 
Z OS IBM Utilities
Z OS IBM UtilitiesZ OS IBM Utilities
Z OS IBM Utilities
 
Ipl process
Ipl processIpl process
Ipl process
 
Jcl
JclJcl
Jcl
 
Mvs commands
Mvs commandsMvs commands
Mvs commands
 
JCL UTILITIES IEBCOPY
JCL UTILITIES IEBCOPYJCL UTILITIES IEBCOPY
JCL UTILITIES IEBCOPY
 
Mainframe jcl exec and dd statements part - 3
Mainframe jcl exec and dd statements part - 3Mainframe jcl exec and dd statements part - 3
Mainframe jcl exec and dd statements part - 3
 
IBM Utilities
IBM UtilitiesIBM Utilities
IBM Utilities
 
Mainframe - OPC
Mainframe -  OPCMainframe -  OPC
Mainframe - OPC
 
Resource Access Control Facility (RACF) in Mainframes
Resource Access Control Facility (RACF) in MainframesResource Access Control Facility (RACF) in Mainframes
Resource Access Control Facility (RACF) in Mainframes
 
20 DFSORT Tricks For Zos Users - Interview Questions
20 DFSORT Tricks For Zos Users - Interview Questions20 DFSORT Tricks For Zos Users - Interview Questions
20 DFSORT Tricks For Zos Users - Interview Questions
 
Smpe
SmpeSmpe
Smpe
 
100 COOL MAINFRAME TIPS
100 COOL MAINFRAME TIPS100 COOL MAINFRAME TIPS
100 COOL MAINFRAME TIPS
 
IMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialIMS DC Self Study Complete Tutorial
IMS DC Self Study Complete Tutorial
 
DB2 utilities
DB2 utilitiesDB2 utilities
DB2 utilities
 
Z4R: Intro to Storage and DFSMS for z/OS
Z4R: Intro to Storage and DFSMS for z/OSZ4R: Intro to Storage and DFSMS for z/OS
Z4R: Intro to Storage and DFSMS for z/OS
 
Top jcl interview questions and answers job interview tips
Top jcl interview questions and answers job interview tipsTop jcl interview questions and answers job interview tips
Top jcl interview questions and answers job interview tips
 
RACF - The Basics (v1.2)
RACF - The Basics (v1.2)RACF - The Basics (v1.2)
RACF - The Basics (v1.2)
 
Vsam
VsamVsam
Vsam
 

Similar to JCL MAINFRAMES

Ch16Slides.ppt
Ch16Slides.pptCh16Slides.ppt
Ch16Slides.ppt
konanpenkon
 
IBM Introduction to New Mainframe_ z-OS Basics - Chap. 16 - Topics in z-OS Sy...
IBM Introduction to New Mainframe_ z-OS Basics - Chap. 16 - Topics in z-OS Sy...IBM Introduction to New Mainframe_ z-OS Basics - Chap. 16 - Topics in z-OS Sy...
IBM Introduction to New Mainframe_ z-OS Basics - Chap. 16 - Topics in z-OS Sy...
NicholasVanHaiVu
 
A z/OS System Programmer’s Guide to Migrating to a New IBM System z9 EC or z9...
A z/OS System Programmer’s Guide to Migrating to a New IBM System z9 EC or z9...A z/OS System Programmer’s Guide to Migrating to a New IBM System z9 EC or z9...
A z/OS System Programmer’s Guide to Migrating to a New IBM System z9 EC or z9...
IBM India Smarter Computing
 
Servidor IBM zEnterprise BC12
Servidor IBM zEnterprise BC12Servidor IBM zEnterprise BC12
Servidor IBM zEnterprise BC12
Anderson Bassani
 
DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4
Pranav Prakash
 
DB2UDB_the_Basics
DB2UDB_the_BasicsDB2UDB_the_Basics
DB2UDB_the_Basics
Pranav Prakash
 
Cell Technology for Graphics and Visualization
Cell Technology for Graphics and VisualizationCell Technology for Graphics and Visualization
Cell Technology for Graphics and Visualization
Slide_N
 
IBM Systems Technical Symposium Melbourne, 2015
IBM Systems Technical Symposium Melbourne, 2015IBM Systems Technical Symposium Melbourne, 2015
IBM Systems Technical Symposium Melbourne, 2015
Filipe Miranda
 
Strategy and best practice for modern RPG
Strategy and best practice for modern RPGStrategy and best practice for modern RPG
Strategy and best practice for modern RPG
Alemanalfredo
 
IMS Application Development and Simplification - Phoenix UG - June 19th, 2014
IMS Application Development and Simplification - Phoenix UG - June 19th, 2014IMS Application Development and Simplification - Phoenix UG - June 19th, 2014
IMS Application Development and Simplification - Phoenix UG - June 19th, 2014
Jeff Pearce
 
Less04_Database_Instance.ppt
Less04_Database_Instance.pptLess04_Database_Instance.ppt
Less04_Database_Instance.ppt
MuhammadUmair833474
 
Cell Broadband EngineTM: and Cell/B.E. based blade technology
Cell Broadband EngineTM: and Cell/B.E. based blade technologyCell Broadband EngineTM: and Cell/B.E. based blade technology
Cell Broadband EngineTM: and Cell/B.E. based blade technology
Slide_N
 
Ch7 v70 scl_en
Ch7 v70 scl_enCh7 v70 scl_en
Ch7 v70 scl_en
confidencial
 
Db2 for z os trends
Db2 for z os trendsDb2 for z os trends
Db2 for z os trends
Cuneyt Goksu
 
DB2 Commands.ppt
DB2 Commands.pptDB2 Commands.ppt
DB2 Commands.ppt
Prashant Kulkarni
 
Visão geral do hardware do servidor System z e Linux on z - Concurso Mainframe
Visão geral do hardware do servidor System z e Linux on z - Concurso MainframeVisão geral do hardware do servidor System z e Linux on z - Concurso Mainframe
Visão geral do hardware do servidor System z e Linux on z - Concurso Mainframe
Anderson Bassani
 
I Didn't Know You Could Do That with zOS.pdf
I Didn't Know You Could Do That with zOS.pdfI Didn't Know You Could Do That with zOS.pdf
I Didn't Know You Could Do That with zOS.pdf
Marna Walle
 
DB2UDB_the_Basics Day 6
DB2UDB_the_Basics Day 6DB2UDB_the_Basics Day 6
DB2UDB_the_Basics Day 6
Pranav Prakash
 
DB2UDB_the_Basics Day 7
DB2UDB_the_Basics Day 7DB2UDB_the_Basics Day 7
DB2UDB_the_Basics Day 7
Pranav Prakash
 
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
timfanelli
 

Similar to JCL MAINFRAMES (20)

Ch16Slides.ppt
Ch16Slides.pptCh16Slides.ppt
Ch16Slides.ppt
 
IBM Introduction to New Mainframe_ z-OS Basics - Chap. 16 - Topics in z-OS Sy...
IBM Introduction to New Mainframe_ z-OS Basics - Chap. 16 - Topics in z-OS Sy...IBM Introduction to New Mainframe_ z-OS Basics - Chap. 16 - Topics in z-OS Sy...
IBM Introduction to New Mainframe_ z-OS Basics - Chap. 16 - Topics in z-OS Sy...
 
A z/OS System Programmer’s Guide to Migrating to a New IBM System z9 EC or z9...
A z/OS System Programmer’s Guide to Migrating to a New IBM System z9 EC or z9...A z/OS System Programmer’s Guide to Migrating to a New IBM System z9 EC or z9...
A z/OS System Programmer’s Guide to Migrating to a New IBM System z9 EC or z9...
 
Servidor IBM zEnterprise BC12
Servidor IBM zEnterprise BC12Servidor IBM zEnterprise BC12
Servidor IBM zEnterprise BC12
 
DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4
 
DB2UDB_the_Basics
DB2UDB_the_BasicsDB2UDB_the_Basics
DB2UDB_the_Basics
 
Cell Technology for Graphics and Visualization
Cell Technology for Graphics and VisualizationCell Technology for Graphics and Visualization
Cell Technology for Graphics and Visualization
 
IBM Systems Technical Symposium Melbourne, 2015
IBM Systems Technical Symposium Melbourne, 2015IBM Systems Technical Symposium Melbourne, 2015
IBM Systems Technical Symposium Melbourne, 2015
 
Strategy and best practice for modern RPG
Strategy and best practice for modern RPGStrategy and best practice for modern RPG
Strategy and best practice for modern RPG
 
IMS Application Development and Simplification - Phoenix UG - June 19th, 2014
IMS Application Development and Simplification - Phoenix UG - June 19th, 2014IMS Application Development and Simplification - Phoenix UG - June 19th, 2014
IMS Application Development and Simplification - Phoenix UG - June 19th, 2014
 
Less04_Database_Instance.ppt
Less04_Database_Instance.pptLess04_Database_Instance.ppt
Less04_Database_Instance.ppt
 
Cell Broadband EngineTM: and Cell/B.E. based blade technology
Cell Broadband EngineTM: and Cell/B.E. based blade technologyCell Broadband EngineTM: and Cell/B.E. based blade technology
Cell Broadband EngineTM: and Cell/B.E. based blade technology
 
Ch7 v70 scl_en
Ch7 v70 scl_enCh7 v70 scl_en
Ch7 v70 scl_en
 
Db2 for z os trends
Db2 for z os trendsDb2 for z os trends
Db2 for z os trends
 
DB2 Commands.ppt
DB2 Commands.pptDB2 Commands.ppt
DB2 Commands.ppt
 
Visão geral do hardware do servidor System z e Linux on z - Concurso Mainframe
Visão geral do hardware do servidor System z e Linux on z - Concurso MainframeVisão geral do hardware do servidor System z e Linux on z - Concurso Mainframe
Visão geral do hardware do servidor System z e Linux on z - Concurso Mainframe
 
I Didn't Know You Could Do That with zOS.pdf
I Didn't Know You Could Do That with zOS.pdfI Didn't Know You Could Do That with zOS.pdf
I Didn't Know You Could Do That with zOS.pdf
 
DB2UDB_the_Basics Day 6
DB2UDB_the_Basics Day 6DB2UDB_the_Basics Day 6
DB2UDB_the_Basics Day 6
 
DB2UDB_the_Basics Day 7
DB2UDB_the_Basics Day 7DB2UDB_the_Basics Day 7
DB2UDB_the_Basics Day 7
 
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
 

JCL MAINFRAMES

  • 1. Introduction to the new mainframe Chapter 6: Using Job Control Language (JCL) and System Display and Search Facility (SDSF) © Copyright IBM Corp., 2005. All rights reserved.
  • 2. Introduction to the new mainframe –Presentation On Mainframes –Kamal Singh Dhakar –kamalsgsits@gmail.com © Copyright IBM Corp., 2005. All rights reserved.
  • 3. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. Chapter 6 objectives Be able to: • Explain how JCL works with the system, give an overview of JCL coding techniques, and know a few of the more important statements and keywords • Create a simple job and submit it for execution • Check the output of your job through SDSF
  • 4. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. Key terms in this chapter • concatenation • DD statement • job control language (JCL) • JOB statement • EXEC statement • job name • procedure (PROC) • record format (RECFM) • system display and search facility (SDSF) • step name • system catalog • system library • utility
  • 5. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. What is JCL? Job control language (JCL) tells the system what program to execute and provides a description of program inputs and outputs. There are three basic JCL statements: • JOB statement • EXEC statement • DD statement
  • 6. Introduction to the new mainframe JCL must be uppercase Forward slash in column 1 and 2 Name (1-8 characters) follow the slashes Space separators © Copyright IBM Corp., 2005. All rights reserved. Basic JCL coding syntax //JOBNAME JOB //STEPNAME EXEC //DDNAME DD //* comment - upper or lower case /* ....end of JCL stream
  • 7. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. JCL example //MYJOB JOB 1 //MYSORT EXEC PGM=SORT //SORTIN DD DISP=SHR,DSN=IBMUSER.AREA.CODES //SORTOUT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSIN DD * SORT FIELDS=(1,3,CH,A) /*
  • 8. Introduction to the new mainframe In the preceding example… MYJOB Job name MYSORT Step name SORTIN DD name for program input SORTOUT DD name for program output SYSOUT Where to send system output messages (such as a data set) SYSIN Specifies whether the input will be data or control statements. © Copyright IBM Corp., 2005. All rights reserved.
  • 9. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. JCL: JOB statement Create a member using ISPF edit Create JCL statements JOB statement Accounting information Execution classes
  • 10. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. JCL: EXEC statement EXEC statement Region size
  • 11. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. JCL: DD statement DD statement DD name (referenced in the program) DSN= (the data set name as cataloged on disk)
  • 12. Introduction to the new mainframe Specifying a data set disposition: DISP is an operand of the DD statement DISP indicates what to do with the data set (the disposition) at step start, end, or abnormal end (if the job fails) DISP helps to prevent unwanted simultaneous access to data sets, which is very important for general system operation. © Copyright IBM Corp., 2005. All rights reserved.
  • 13. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. Uses of the DISP= operand DISP=(status,normal end,abnormal end) DISP=(status,normal end) DISP=status where status can be • NEW • OLD • SHR • MOD
  • 14. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. Creating a new data set New data sets can be created through JCL by using the DISP=NEW parameter. For a DISP=NEW request, you need to supply more information, including: • A data set name, DSN= • The type of device for the data set, UNIT=sysda • If a disk is used, the amount of space to be allocated for the primary extent must be specified, SPACE= • If it is a partitioned data set, the size of the directory must be specified within the SPACE parameter • Optionally, DCB parameters can be specified.
  • 15. Introduction to the new mainframe Continuation and concatenation Needed to overcome the limitations of the 80-column punched cards used in earlier systems. • Continuation allows a JCL statement to span multiple records. • Concatenation allows a single ddname to have multiple DD © Copyright IBM Corp., 2005. All rights reserved. statements.
  • 16. Introduction to the new mainframe Continuation and concatenation (example) Continuation example © Copyright IBM Corp., 2005. All rights reserved. //JOBCARD JOB 1, // REGION=8M, // NOTIFY=IBMUSER Concatenation example //DATAIN DD DISP=OLD,DSN=MY.INPUT1 // DD DISP=OLD,DSN=MY.INPUT2 // DD DISP=SHR,DSN=YOUR.DATA
  • 17. Introduction to the new mainframe JCL procedures - example //MYJOB JOB 1 //MYPROC PROC //MYSORT EXEC PGM=SORT //SORTIN DD DISP=SHR,DSN=&SORTDSN //SORTOUT DD SYSOUT=* //SYSOUT DD SYSOUT=* // PEND © Copyright IBM Corp., 2005. All rights reserved.
  • 18. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. JCL procedures (continued) //MYJOB JOB 1 //*---------------------------------* //MYPROC PROC //MYSORT EXEC PGM=SORT //SORTIN DD DISP=SHR,DSN=&SORTDSN //SORTOUT DD SYSOUT=* //SYSOUT DD SYSOUT=* // PEND //*---------------------------------* //STEP1 EXEC MYPROC,SORTDSN=IBMUSER.AREA.CODES //SYSIN DD * SORT FIELDS=(1,3,CH,A)
  • 19. Introduction to the new mainframe JCL procedures -- statement override //MYJOB JOB 1 //*---------------------------------* //MYPROC PROC //MYSORT EXEC PGM=SORT //SORTIN DD DISP=SHR,DSN=&SORTDSN //SORTOUT DD SYSOUT=* //SYSOUT DD SYSOUT=* // PEND //*---------------------------------* //STEP1 EXEC MYPROC,SORTDSN=IBMUSER.AREA.CODES //MYSORT.SORTOUT DD DSN=IBMUSER.MYSORT.OUTPUT, // DISP=(NEW,CATLG),SPACE=(CYL,(1,1)), // UNIT=SYSDA,VOL=SER=SHARED, // DCB=(LRECL=20,BLKSIZE=0,RECFM=FB,DSORG=PS) //SYSIN DD * © Copyright IBM Corp., 2005. All rights reserved. SORT FIELDS=(1,3,CH,A)
  • 20. Introduction to the new mainframe Using SDSF After submitting a job, z/OS users use System Display and Search Facility (SDSF) to review the job output for successful completion or JCL errors. © Copyright IBM Corp., 2005. All rights reserved. SDSF allows users to: • View and search the system log • Enter system commands • Hold, release, cancel, and purge jobs • Monitor jobs while they are processed • Display job output before deciding to print it • Control the order in which jobs are processed • Control the order in which output is printed • Control printers and initiators
  • 21. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. SDSF panel hierarchy
  • 22. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. SDSF: Primary option menu
  • 23. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. SDSF: Options menu
  • 24. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. Viewing the JES2 output files Screen 1 Screen 2
  • 25. Introduction to the new mainframe SDSF: Display active users (DA) © Copyright IBM Corp., 2005. All rights reserved. Display Filter View Print Options Help ----------------------------------------------------------------------------- SDSF DA SC67 SC67 PAG 0 SIO 7 CPU 6/ 7 LINE 1-25 (64) COMMAND INPUT ===> SCROLL ===> PAG PREFIX=* DEST=LOCAL OWNER=* SORT=JOBNAME/A NP JOBNAME STEPNAME PROCSTEP JOBID OWNER C POS DP REAL PAGING SIO *MASTER* STC06373 +MASTER+ NS FF 1369 0.00 0.00 ALLOCAS ALLOCAS NS FF 190 0.00 0.00 ANTAS000 ANTAS000 IEFPROC NS FE 1216 0.00 0.00 ANTMAIN ANTMAIN IEFPROC NS FF 4541 0.00 0.00 APPC APPC APPC NS FE 2653 0.00 0.00 ASCH ASCH ASCH NS FE 267 0.00 0.00 BPXOINIT BPXOINIT BPXOINIT LO FF 315 0.00 0.00 CATALOG CATALOG IEFPROC NS FF 1246 0.00 0.00 CICSPAAY CICSPAAY CICS520 STC06504 STC NS FE 4330 0.00 0.00 CONSOLE CONSOLE NS FF 597 0.00 0.00 DFRMM DFRMM IEFPROC STC06363 STC NS FE 510 0.00 0.00 DFSMSHSM HSMSC67 DFSMSHSM STC13178 STC NS FE 6199 0.00 0.00 DUMPSRV DUMPSRV DUMPSRV NS FF 160 0.00 0.00 FTPDMVS1 STEP1 STC06477 STC LO FF 470 0.00 0.00 FTPDOE1 STEP1 STC06475 FTPDOE LO FF 469 0.00 0.00 GRS GRS NS FF 894 0.00 0.00 IEFSCHAS IEFSCHAS NS FF 25 0.00 0.00 IMWEBSUF IMWEBSUF WEBSRV STC15245 WEBSRV IN FE 15T 0.00 0.00
  • 26. Introduction to the new mainframe Issuing MVS and JES commands © Copyright IBM Corp., 2005. All rights reserved.
  • 27. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. SDSF: Input queue panel
  • 28. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. SDSF: Output queue panel
  • 29. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. SDSF: Held output queue panel
  • 30. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. SDSF: Status panel
  • 31. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. Utilities • z/OS includes a number of programs useful in batch processing called utilities. • Utilities provide many small, obvious, and useful functions. • A basic set of system-provided utilities is described in the textbook (Appendix C). • Customer sites often write their own utility programs, many of which are shared by the z/OS user community. • Some examples of utilities: • IEBGENER Copies a sequential data set • IEBCOPY Copies a partitioned data set • IDCAMS Works with VSAM data sets
  • 32. Introduction to the new mainframe System Libraries z/OS has many standard system libraries, including: • SYS1.PROCLIB JCL procedures distributed © Copyright IBM Corp., 2005. All rights reserved. with z/OS • SYS1.PARMLIB Control parameters for z/OS and some program products. • SYS1.LINKLIB Many of the basic execution modules of the system. • SYS1.LPALIB System execution modules that are loaded into the link pack area at z/OS initialization.
  • 33. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. Summary • Basic JCL contains three statements: JOB, EXEC, and DD. • A program can access different groups of data sets in different jobs by changing the JCL for each job. • New data sets can be created through JCL by using the DISP=NEW parameter. • Users normally use JCL procedures for more complex jobs. A cataloged procedure is written once and can then be used by many users. • z/OS supplies many JCL procedures, and locally-written ones can be added easily. • A user must understand how to override or extend statements in a JCL procedure to supply the parameters (usually DD statements) needed for a specific job.
  • 34. Introduction to the new mainframe © Copyright IBM Corp., 2005. All rights reserved. Summary - continued • SDSF is a panel interface for viewing the system log and the list of active users and controlling and monitoring jobs and resources. • Utility programs make operating on data sets easier • System libraries contain JCL procedures, control parameters, and system execution modules.