SlideShare a Scribd company logo
1 of 33
Download to read offline
Introduction to the new mainfame


Chapter 6: Using Job Control Language (JCL) and Spool
Display and Search Facility (SDSF)




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



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




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



Key terms in this chapter

         •concatenation             •   RECFM (record format)
         •DD statement              •   SDSF
         •JCL                       •   step name
         •JOB statement             •   system catalog
         •EXEC statement            •   system library
         •job name                  •   utility
         •PROC




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


What is JCL?

     Job control language (JCL) is used to tell the
       system what program to execute, followed by a
       description of program inputs and outputs.
     There are three basic JCL statements:
         • JOB statement
         • EXEC statement
         • DD statement




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



Basic JCL coding syntax
            JCL must be uppercase
                  Forward slash in column 1 and 2
                      Name (1-8 characters) follow the slashes
                               Space separators

             //JOBNAME JOB
             //STEPNAME EXEC
             //DDNAME        DD
             //* comment - upper or lower case
             /* ....end of JCL stream

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



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)
/*




                                    © Copyright IBM Corp., 2005. All rights reserved.
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



JCL: JOB statement
            Create a member using ISPF edit
            Create JCL statements
             JOB statement
                Accounting information
                Execution classes




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



JCL: EXEC statement

           EXEC statement
              Region size




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



JCL: DD statement
            DD statement
             DD name (referenced in the program)
             DSN= (the data set name as cataloged on disk)




                                          © Copyright IBM Corp., 2005. All rights reserved.
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



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




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



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.




                                         © Copyright IBM Corp., 2005. All rights reserved.
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
      statements.




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



Continuation and concatenation (example)
Continuation example
       //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




                                    © Copyright IBM Corp., 2005. All rights reserved.
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



JCL procedures -- another example
//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)




                                     © Copyright IBM Corp., 2005. All rights reserved.
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 *
        SORT FIELDS=(1,3,CH,A)




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



Using SDSF
After submitting a job, it is common for z/OS users to use System Display and
   Search Facility (SDSF) to review the job output for successful completion or
   JCL errors.

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




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



SDSF panel hierarchy                                    Primary
                                                        Option
                                                         Menu




                 Display                            Help
                           Input      Output
       SYSLOG    Active                            Output              Status             Printer            Initiator
                           Queue      Queue
        Panel    Users                             Queue               Panel               Panel              Panel
                           Panel      Panel
                 Panel                             Panel




                                 Job        Output
                               Data Set    Descriptor
                                Panel        Panel




                                Output
                               Data Set
                                Panel

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



SDSF: Primary option menu




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



SDSF: Options menu




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



Viewing the JES2 output files
      Screen 1




     Screen 2




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



SDSF: Display active users (DA)
      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




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



Issuing MVS and JES commands




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



SDSF: Input queue panel




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



SDSF: Output queue panel




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



SDSF: Held output queue panel




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



SDSF: Status panel




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



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



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



System Libraries
z/OS has many standard system libraries, including:

    • SYS1.PROCLIB         JCL procedures distributed
                           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.




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


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.


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


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.




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

More Related Content

What's hot

Introduction of ISPF
Introduction of ISPFIntroduction of ISPF
Introduction of ISPFAnil Bharti
 
Xdc command-to-print-job-output-and-syslog-from-sdsf
Xdc command-to-print-job-output-and-syslog-from-sdsfXdc command-to-print-job-output-and-syslog-from-sdsf
Xdc command-to-print-job-output-and-syslog-from-sdsfMaintec Technologies Inc.
 
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 - 3janaki ram
 
JCL FOR FRESHERS
JCL FOR FRESHERSJCL FOR FRESHERS
JCL FOR FRESHERSNirmal Pati
 
Jcl utilities iebgener
Jcl  utilities iebgenerJcl  utilities iebgener
Jcl utilities iebgenerjanaki ram
 
Upgrade to IBM z/OS V2.4 technical actions
Upgrade to IBM z/OS V2.4 technical actionsUpgrade to IBM z/OS V2.4 technical actions
Upgrade to IBM z/OS V2.4 technical actionsMarna Walle
 
Vsam presentation PPT
Vsam presentation PPTVsam presentation PPT
Vsam presentation PPTAnil Polsani
 
JCL UTILITIES IEBCOPY
JCL UTILITIES IEBCOPYJCL UTILITIES IEBCOPY
JCL UTILITIES IEBCOPYjanaki ram
 
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 tipsjcltutorial
 
DB2 for z/OS Architecture in Nutshell
DB2 for z/OS Architecture in NutshellDB2 for z/OS Architecture in Nutshell
DB2 for z/OS Architecture in NutshellCuneyt Goksu
 
CICS basics overview session-1
CICS basics overview session-1CICS basics overview session-1
CICS basics overview session-1Srinimf-Slides
 
IMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialIMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialSrinimf-Slides
 
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 QuestionsSrinimf-Slides
 
zOSMF SDSF_ShareLab_V2R5.pdf
zOSMF SDSF_ShareLab_V2R5.pdfzOSMF SDSF_ShareLab_V2R5.pdf
zOSMF SDSF_ShareLab_V2R5.pdfMarna Walle
 
Basic concept of jcl
Basic concept of jclBasic concept of jcl
Basic concept of jclAnil Bharti
 

What's hot (20)

Skillwise JCL
Skillwise JCLSkillwise JCL
Skillwise JCL
 
Introduction of ISPF
Introduction of ISPFIntroduction of ISPF
Introduction of ISPF
 
Xdc command-to-print-job-output-and-syslog-from-sdsf
Xdc command-to-print-job-output-and-syslog-from-sdsfXdc command-to-print-job-output-and-syslog-from-sdsf
Xdc command-to-print-job-output-and-syslog-from-sdsf
 
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
 
JCL FOR FRESHERS
JCL FOR FRESHERSJCL FOR FRESHERS
JCL FOR FRESHERS
 
Jcl utilities iebgener
Jcl  utilities iebgenerJcl  utilities iebgener
Jcl utilities iebgener
 
Upgrade to IBM z/OS V2.4 technical actions
Upgrade to IBM z/OS V2.4 technical actionsUpgrade to IBM z/OS V2.4 technical actions
Upgrade to IBM z/OS V2.4 technical actions
 
Vsam presentation PPT
Vsam presentation PPTVsam presentation PPT
Vsam presentation PPT
 
JCL UTILITIES IEBCOPY
JCL UTILITIES IEBCOPYJCL UTILITIES IEBCOPY
JCL UTILITIES IEBCOPY
 
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
 
Ipl process
Ipl processIpl process
Ipl process
 
DB2 for z/OS Architecture in Nutshell
DB2 for z/OS Architecture in NutshellDB2 for z/OS Architecture in Nutshell
DB2 for z/OS Architecture in Nutshell
 
Tso and ispf
Tso and ispfTso and ispf
Tso and ispf
 
CICS basics overview session-1
CICS basics overview session-1CICS basics overview session-1
CICS basics overview session-1
 
IBM Utilities
IBM UtilitiesIBM Utilities
IBM Utilities
 
Skillwise cics part 1
Skillwise cics part 1Skillwise cics part 1
Skillwise cics part 1
 
IMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialIMS DC Self Study Complete Tutorial
IMS DC Self Study Complete Tutorial
 
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
 
zOSMF SDSF_ShareLab_V2R5.pdf
zOSMF SDSF_ShareLab_V2R5.pdfzOSMF SDSF_ShareLab_V2R5.pdf
zOSMF SDSF_ShareLab_V2R5.pdf
 
Basic concept of jcl
Basic concept of jclBasic concept of jcl
Basic concept of jcl
 

Viewers also liked

JCL BEYOND DFSORT
JCL BEYOND DFSORTJCL BEYOND DFSORT
JCL BEYOND DFSORTNirmal Pati
 
online training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBAonline training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBARavikumar Nandigam
 
DB2 Interview Questions - Part 1
DB2 Interview Questions - Part 1DB2 Interview Questions - Part 1
DB2 Interview Questions - Part 1ReKruiTIn.com
 
Mainframe refresher-part-1
Mainframe refresher-part-1Mainframe refresher-part-1
Mainframe refresher-part-1vishwas17
 
Ibm db2 interview questions and answers
Ibm db2 interview questions and answersIbm db2 interview questions and answers
Ibm db2 interview questions and answersSweta Singh
 
20 Tweetable Quotes to Inspire Marketing & Design Creative Genius
20 Tweetable Quotes to Inspire Marketing & Design Creative Genius20 Tweetable Quotes to Inspire Marketing & Design Creative Genius
20 Tweetable Quotes to Inspire Marketing & Design Creative GeniusIMPACT Branding & Design LLC
 
40 Tools in 20 Minutes: Hacking your Marketing Career
40 Tools in 20 Minutes: Hacking your Marketing Career40 Tools in 20 Minutes: Hacking your Marketing Career
40 Tools in 20 Minutes: Hacking your Marketing CareerEric Leist
 
How to Craft Your Company's Storytelling Voice by Ann Handley of MarketingProfs
How to Craft Your Company's Storytelling Voice by Ann Handley of MarketingProfsHow to Craft Your Company's Storytelling Voice by Ann Handley of MarketingProfs
How to Craft Your Company's Storytelling Voice by Ann Handley of MarketingProfsMarketingProfs
 
What REALLY Differentiates The Best Content Marketers From The Rest
What REALLY Differentiates The Best Content Marketers From The RestWhat REALLY Differentiates The Best Content Marketers From The Rest
What REALLY Differentiates The Best Content Marketers From The RestRoss Simmonds
 
Creating Powerful Customer Experiences
Creating Powerful Customer ExperiencesCreating Powerful Customer Experiences
Creating Powerful Customer ExperiencesDigital Surgeons
 

Viewers also liked (18)

JCL SORT TOOL
JCL SORT TOOLJCL SORT TOOL
JCL SORT TOOL
 
JCL BEYOND DFSORT
JCL BEYOND DFSORTJCL BEYOND DFSORT
JCL BEYOND DFSORT
 
online training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBAonline training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBA
 
JCL DFSORT
JCL DFSORTJCL DFSORT
JCL DFSORT
 
DB2 Interview Questions - Part 1
DB2 Interview Questions - Part 1DB2 Interview Questions - Part 1
DB2 Interview Questions - Part 1
 
Mvs commands
Mvs commandsMvs commands
Mvs commands
 
Indian Rhino
Indian RhinoIndian Rhino
Indian Rhino
 
DB2 utilities
DB2 utilitiesDB2 utilities
DB2 utilities
 
Mainframe refresher-part-1
Mainframe refresher-part-1Mainframe refresher-part-1
Mainframe refresher-part-1
 
Repot writing ppt
Repot writing pptRepot writing ppt
Repot writing ppt
 
Ibm db2 interview questions and answers
Ibm db2 interview questions and answersIbm db2 interview questions and answers
Ibm db2 interview questions and answers
 
20 Tweetable Quotes to Inspire Marketing & Design Creative Genius
20 Tweetable Quotes to Inspire Marketing & Design Creative Genius20 Tweetable Quotes to Inspire Marketing & Design Creative Genius
20 Tweetable Quotes to Inspire Marketing & Design Creative Genius
 
40 Tools in 20 Minutes: Hacking your Marketing Career
40 Tools in 20 Minutes: Hacking your Marketing Career40 Tools in 20 Minutes: Hacking your Marketing Career
40 Tools in 20 Minutes: Hacking your Marketing Career
 
2015 Travel Trends
2015 Travel Trends 2015 Travel Trends
2015 Travel Trends
 
How to Craft Your Company's Storytelling Voice by Ann Handley of MarketingProfs
How to Craft Your Company's Storytelling Voice by Ann Handley of MarketingProfsHow to Craft Your Company's Storytelling Voice by Ann Handley of MarketingProfs
How to Craft Your Company's Storytelling Voice by Ann Handley of MarketingProfs
 
Build a Better Entrepreneur Pitch Deck
Build a Better Entrepreneur Pitch DeckBuild a Better Entrepreneur Pitch Deck
Build a Better Entrepreneur Pitch Deck
 
What REALLY Differentiates The Best Content Marketers From The Rest
What REALLY Differentiates The Best Content Marketers From The RestWhat REALLY Differentiates The Best Content Marketers From The Rest
What REALLY Differentiates The Best Content Marketers From The Rest
 
Creating Powerful Customer Experiences
Creating Powerful Customer ExperiencesCreating Powerful Customer Experiences
Creating Powerful Customer Experiences
 

Similar to Jcl

Cell Technology for Graphics and Visualization
Cell Technology for Graphics and VisualizationCell Technology for Graphics and Visualization
Cell Technology for Graphics and VisualizationSlide_N
 
Servidor IBM zEnterprise BC12
Servidor IBM zEnterprise BC12Servidor IBM zEnterprise BC12
Servidor IBM zEnterprise BC12Anderson Bassani
 
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
 
DB2UDB_the_Basics Day 5
DB2UDB_the_Basics Day 5DB2UDB_the_Basics Day 5
DB2UDB_the_Basics Day 5Pranav Prakash
 
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 technologySlide_N
 
Db2 for z os trends
Db2 for z os trendsDb2 for z os trends
Db2 for z os trendsCuneyt Goksu
 
DB2UDB_the_Basics Day 7
DB2UDB_the_Basics Day 7DB2UDB_the_Basics Day 7
DB2UDB_the_Basics Day 7Pranav Prakash
 
zOS 21 JES2 Symbol Services and Other New Services .pdf
zOS 21 JES2 Symbol Services and Other New Services .pdfzOS 21 JES2 Symbol Services and Other New Services .pdf
zOS 21 JES2 Symbol Services and Other New Services .pdfazeemmohd6
 
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning AccelerationclCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning AccelerationIntel® Software
 
z/OS Small Enhancements - Episode 2013A
z/OS Small Enhancements - Episode 2013Az/OS Small Enhancements - Episode 2013A
z/OS Small Enhancements - Episode 2013AMarna Walle
 
Intro to Cell Broadband Engine for HPC
Intro to Cell Broadband Engine for HPCIntro to Cell Broadband Engine for HPC
Intro to Cell Broadband Engine for HPCSlide_N
 
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
 
Honeywell vista-10p-programming-guide
Honeywell vista-10p-programming-guideHoneywell vista-10p-programming-guide
Honeywell vista-10p-programming-guideAlarm Grid
 

Similar to Jcl (20)

Cell Technology for Graphics and Visualization
Cell Technology for Graphics and VisualizationCell Technology for Graphics and Visualization
Cell Technology for Graphics and Visualization
 
Servidor IBM zEnterprise BC12
Servidor IBM zEnterprise BC12Servidor IBM zEnterprise BC12
Servidor IBM zEnterprise BC12
 
DB2UDB_the_Basics
DB2UDB_the_BasicsDB2UDB_the_Basics
DB2UDB_the_Basics
 
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...
 
Introduction to z/OS
Introduction to z/OSIntroduction to z/OS
Introduction to z/OS
 
DB2UDB_the_Basics Day 5
DB2UDB_the_Basics Day 5DB2UDB_the_Basics Day 5
DB2UDB_the_Basics Day 5
 
Type-safe DSLs
Type-safe DSLsType-safe DSLs
Type-safe DSLs
 
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
 
Db2 for z os trends
Db2 for z os trendsDb2 for z os trends
Db2 for z os trends
 
DB2UDB_the_Basics Day 7
DB2UDB_the_Basics Day 7DB2UDB_the_Basics Day 7
DB2UDB_the_Basics Day 7
 
zOS 21 JES2 Symbol Services and Other New Services .pdf
zOS 21 JES2 Symbol Services and Other New Services .pdfzOS 21 JES2 Symbol Services and Other New Services .pdf
zOS 21 JES2 Symbol Services and Other New Services .pdf
 
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning AccelerationclCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
 
z/OS Small Enhancements - Episode 2013A
z/OS Small Enhancements - Episode 2013Az/OS Small Enhancements - Episode 2013A
z/OS Small Enhancements - Episode 2013A
 
Kernel Debugging & Profiling
Kernel Debugging & ProfilingKernel Debugging & Profiling
Kernel Debugging & Profiling
 
Intro to Cell Broadband Engine for HPC
Intro to Cell Broadband Engine for HPCIntro to Cell Broadband Engine for HPC
Intro to Cell Broadband Engine for HPC
 
DB2 Commands.ppt
DB2 Commands.pptDB2 Commands.ppt
DB2 Commands.ppt
 
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...
 
TSRT Crashes
TSRT CrashesTSRT Crashes
TSRT Crashes
 
Honeywell vista-10p-programming-guide
Honeywell vista-10p-programming-guideHoneywell vista-10p-programming-guide
Honeywell vista-10p-programming-guide
 

More from shivas

Cobolbasics
CobolbasicsCobolbasics
Cobolbasicsshivas
 
Mainframe
MainframeMainframe
Mainframeshivas
 
Premmanispecification
PremmanispecificationPremmanispecification
Premmanispecificationshivas
 
Premmani
PremmaniPremmani
Premmanishivas
 
Premamaniscreenshots
PremamaniscreenshotsPremamaniscreenshots
Premamaniscreenshotsshivas
 
Wordpress
WordpressWordpress
Wordpressshivas
 
Ajax Basics And Framework
Ajax Basics And FrameworkAjax Basics And Framework
Ajax Basics And Frameworkshivas
 
Phpbasics And Php Framework
Phpbasics And Php FrameworkPhpbasics And Php Framework
Phpbasics And Php Frameworkshivas
 
Frame Work
Frame WorkFrame Work
Frame Workshivas
 
Web2.O Basics
Web2.O BasicsWeb2.O Basics
Web2.O Basicsshivas
 

More from shivas (11)

Cobolbasics
CobolbasicsCobolbasics
Cobolbasics
 
Mainframe
MainframeMainframe
Mainframe
 
Premmanispecification
PremmanispecificationPremmanispecification
Premmanispecification
 
Premmani
PremmaniPremmani
Premmani
 
Premamaniscreenshots
PremamaniscreenshotsPremamaniscreenshots
Premamaniscreenshots
 
Wordpress
WordpressWordpress
Wordpress
 
Ajax Basics And Framework
Ajax Basics And FrameworkAjax Basics And Framework
Ajax Basics And Framework
 
Phpbasics And Php Framework
Phpbasics And Php FrameworkPhpbasics And Php Framework
Phpbasics And Php Framework
 
Frame Work
Frame WorkFrame Work
Frame Work
 
Frame
FrameFrame
Frame
 
Web2.O Basics
Web2.O BasicsWeb2.O Basics
Web2.O Basics
 

Jcl

  • 1. Introduction to the new mainfame Chapter 6: Using Job Control Language (JCL) and Spool Display and Search Facility (SDSF) © Copyright IBM Corp., 2005. All rights reserved.
  • 2. Introduction to the new mainframe 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 © Copyright IBM Corp., 2005. All rights reserved.
  • 3. Introduction to the new mainframe Key terms in this chapter •concatenation • RECFM (record format) •DD statement • SDSF •JCL • step name •JOB statement • system catalog •EXEC statement • system library •job name • utility •PROC © Copyright IBM Corp., 2005. All rights reserved.
  • 4. Introduction to the new mainframe What is JCL? Job control language (JCL) is used to tell the system what program to execute, followed by a description of program inputs and outputs. There are three basic JCL statements: • JOB statement • EXEC statement • DD statement © Copyright IBM Corp., 2005. All rights reserved.
  • 5. Introduction to the new mainframe Basic JCL coding syntax JCL must be uppercase Forward slash in column 1 and 2 Name (1-8 characters) follow the slashes Space separators //JOBNAME JOB //STEPNAME EXEC //DDNAME DD //* comment - upper or lower case /* ....end of JCL stream © Copyright IBM Corp., 2005. All rights reserved.
  • 6. Introduction to the new mainframe 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) /* © Copyright IBM Corp., 2005. All rights reserved.
  • 7. 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.
  • 8. Introduction to the new mainframe JCL: JOB statement Create a member using ISPF edit Create JCL statements JOB statement Accounting information Execution classes © Copyright IBM Corp., 2005. All rights reserved.
  • 9. Introduction to the new mainframe JCL: EXEC statement EXEC statement Region size © Copyright IBM Corp., 2005. All rights reserved.
  • 10. Introduction to the new mainframe JCL: DD statement DD statement DD name (referenced in the program) DSN= (the data set name as cataloged on disk) © Copyright IBM Corp., 2005. All rights reserved.
  • 11. 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.
  • 12. Introduction to the new mainframe 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 © Copyright IBM Corp., 2005. All rights reserved.
  • 13. Introduction to the new mainframe 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. © Copyright IBM Corp., 2005. All rights reserved.
  • 14. 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 statements. © Copyright IBM Corp., 2005. All rights reserved.
  • 15. Introduction to the new mainframe Continuation and concatenation (example) Continuation example //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 © Copyright IBM Corp., 2005. All rights reserved.
  • 16. 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.
  • 17. Introduction to the new mainframe JCL procedures -- another example //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) © Copyright IBM Corp., 2005. All rights reserved.
  • 18. 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 * SORT FIELDS=(1,3,CH,A) © Copyright IBM Corp., 2005. All rights reserved.
  • 19. Introduction to the new mainframe Using SDSF After submitting a job, it is common for z/OS users to use System Display and Search Facility (SDSF) to review the job output for successful completion or JCL errors. 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 © Copyright IBM Corp., 2005. All rights reserved.
  • 20. Introduction to the new mainframe SDSF panel hierarchy Primary Option Menu Display Help Input Output SYSLOG Active Output Status Printer Initiator Queue Queue Panel Users Queue Panel Panel Panel Panel Panel Panel Panel Job Output Data Set Descriptor Panel Panel Output Data Set Panel © Copyright IBM Corp., 2005. All rights reserved.
  • 21. Introduction to the new mainframe SDSF: Primary option menu © Copyright IBM Corp., 2005. All rights reserved.
  • 22. Introduction to the new mainframe SDSF: Options menu © Copyright IBM Corp., 2005. All rights reserved.
  • 23. Introduction to the new mainframe Viewing the JES2 output files Screen 1 Screen 2 © Copyright IBM Corp., 2005. All rights reserved.
  • 24. Introduction to the new mainframe SDSF: Display active users (DA) 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 © Copyright IBM Corp., 2005. All rights reserved.
  • 25. Introduction to the new mainframe Issuing MVS and JES commands © Copyright IBM Corp., 2005. All rights reserved.
  • 26. Introduction to the new mainframe SDSF: Input queue panel © Copyright IBM Corp., 2005. All rights reserved.
  • 27. Introduction to the new mainframe SDSF: Output queue panel © Copyright IBM Corp., 2005. All rights reserved.
  • 28. Introduction to the new mainframe SDSF: Held output queue panel © Copyright IBM Corp., 2005. All rights reserved.
  • 29. Introduction to the new mainframe SDSF: Status panel © Copyright IBM Corp., 2005. All rights reserved.
  • 30. Introduction to the new mainframe 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 © Copyright IBM Corp., 2005. All rights reserved.
  • 31. Introduction to the new mainframe System Libraries z/OS has many standard system libraries, including: • SYS1.PROCLIB JCL procedures distributed 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. © Copyright IBM Corp., 2005. All rights reserved.
  • 32. Introduction to the new mainframe 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. © Copyright IBM Corp., 2005. All rights reserved.
  • 33. Introduction to the new mainframe 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. © Copyright IBM Corp., 2005. All rights reserved.