JCL material

Embed Size (px)

Citation preview

  • 8/12/2019 JCL material

    1/33

    Introduction to the new mainframe

    Chapter 6: Using Job Control Language (JCL) and

    System Display and Search Facility (SDSF)

    Copyright IBM Corp., 2006. All rights reserved.

  • 8/12/2019 JCL material

    2/33

    Introduction to the new mainframe

    Chapter 6 objectives

    Be able to:

    Explain how JCL works with the system,

    techniques, and know a few of the more

    important statements and keywords

    reate a s mp e o an su m t t orexecution

    Check the out ut of our ob throu h

    SDSF

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

  • 8/12/2019 JCL material

    3/33

    Introduction to the new mainframe

    Key terms in this chapter

    conca ena on

    DD statement

    Job Control Language (JCL)

    recor orma

    system display and search

    facility (SDSF)

    JOB statement

    EXEC statement

    step name

    system catalog

    procedure (PROC)

    utility

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

  • 8/12/2019 JCL material

    4/33

    Introduction to the new mainframe

    What is JCL?

    Job control language (JCL) tells the system what program

    to execute and provides a description of program inputs.

    There are three basic JCL statements:

    EXEC statement

    DD statement

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

  • 8/12/2019 JCL material

    5/33

  • 8/12/2019 JCL material

    6/33

    Introduction to the new mainframe

    JCL example

    MYJOB JOB ,MSGCLASS=T

    //MYSORT EXEC PGM=SORT

    //SORTIN DD DISP=SHR,DSN=IBMUSER.AREA.CODES

    //SORTOUT DD SYSOUT=*

    //SYSOUT DD SYSOUT=*

    SORT FIELDS=(1,3,CH,A)

    /*

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

  • 8/12/2019 JCL material

    7/33

    Introduction to the new mainframe

    In the preceding example

    MYJOB Job name

    MYSORT Step nameSORTIN DD name for program input

    SORTOUT DD name for program output

    SYSOUT Where to send system outputmessages (such as a data set)

    pec es w et er t e nput w

    be data or control statements.

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

  • 8/12/2019 JCL material

    8/33

    Introduction to the new mainframe

    JCL: JOB statement

    Create JCL statements

    JOB statement

    Accounting information

    Execution classes

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

  • 8/12/2019 JCL material

    9/33

    Introduction to the new mainframe

    JCL: EXEC statement

    EXEC statement

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

  • 8/12/2019 JCL material

    10/33

    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., 2006. All rights reserved. 10

  • 8/12/2019 JCL material

    11/33

    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 (thespos on a s ep s ar , en , or a norma en e o

    fails)

    data sets, which is very important for general system

    o eration.

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

  • 8/12/2019 JCL material

    12/33

    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

    MOD

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

  • 8/12/2019 JCL material

    13/33

    Introduction to the new mainframe

    Creating a new data set

    New data sets can be created through JCL by using the

    DISP=NEW parameter.or a = reques , you nee o supp y more

    information, including:

    ,

    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

    Optionally, DCB parameters can be specified.

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

  • 8/12/2019 JCL material

    14/33

    Introduction to the new mainframe

    Continuation and concatenation

    Needed to overcome the limitations of the 80-column

    punched cards used in earlier systems. .

    Concatenation allows a single ddname to have multiple DD

    statements.

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

  • 8/12/2019 JCL material

    15/33

    Introduction to the new mainframe

    Continuation and concatenation (example)

    ont nuat on examp e

    //JOBCARD JOB 1,

    = ,

    // NOTIFY=IBMUSER

    Concatenation example

    //DATAIN DD DISP=OLD,DSN=MY.INPUT1// DD DISP=OLD,DSN=MY.INPUT2

    = , = .

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

  • 8/12/2019 JCL material

    16/33

    Introduction to the new mainframe

    JCL procedures - example

    //MYPROC PROC

    //MYSORT EXEC PGM=SORT

    //SORTIN DD DISP=SHR,DSN=&SORTDSN

    //SORTOUT DD SYSOUT=*

    =

    // PEND

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

  • 8/12/2019 JCL material

    17/33

    Introduction to the new mainframe

    JCL procedures (continued)

    //*---------------------------------*

    //MYPROC PROC=

    //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., 2006. All rights reserved. 17

  • 8/12/2019 JCL material

    18/33

    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

    . = . . ,

    // DISP=(NEW,CATLG),SPACE=(CYL,(1,1)),

    // UNIT=SYSDA,VOL=SER=SHARED,

    , , ,

    //SYSIN DD *

    SORT FIELDS=(1,3,CH,A)

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

  • 8/12/2019 JCL material

    19/33

    Introduction to the new mainframe

    Using SDSF

    ter su m tt ng a o , z users use ystem sp ay an earc

    Facility (SDSF) to review the job output for successful completion

    or JCL errors.

    SDSF allows users to:

    ew an searc e sys em og

    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 output is printed

    Control printers and initiators

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

  • 8/12/2019 JCL material

    20/33

    Introduction to the new mainframe

    SDSF panel hierarchyPrimaryOption

    DisplayIn ut Out ut

    Help

    Panelc ve

    UsersPanel

    Queue

    Panel

    Queue

    Panel

    u puQueuePanel

    a usPanel

    r n erPanel

    n a or Panel

    Job

    Data Set

    Output

    Descriptor

    Output

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

    Data SetPanel

  • 8/12/2019 JCL material

    21/33

    Introduction to the new mainframe

    SDSF: Primary option menu

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

  • 8/12/2019 JCL material

    22/33

    Introduction to the new mainframe

    SDSF: Options menu

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

  • 8/12/2019 JCL material

    23/33

    Introduction to the new mainframe

    Viewing the JES2 output files

    Screen 2

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

  • 8/12/2019 JCL material

    24/33

    Introduction to the new mainframe

    SDSF: Display active users (DA)

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

  • 8/12/2019 JCL material

    25/33

    Introduction to the new mainframe

    Issuing MVS and JES commands

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

  • 8/12/2019 JCL material

    26/33

    Introduction to the new mainframe

    SDSF: Input queue panel

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

  • 8/12/2019 JCL material

    27/33

    Introduction to the new mainframe

    SDSF: Output queue panel

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

  • 8/12/2019 JCL material

    28/33

    Introduction to the new mainframe

    SDSF: Held output queue panel

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

  • 8/12/2019 JCL material

    29/33

    Introduction to the new mainframe

    SDSF: Status panel

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

  • 8/12/2019 JCL material

    30/33

    Introduction to the new mainframe

    Utilities

    z nc u es a num er o programs use u n atc process ng

    called utilities.

    Utilities rovide man small obvious and useful functions.

    A basic set of system-provided utilities is described in the

    textbook (Appendix C).

    ustomer s tes o ten wr te t e r own ut ty programs, many o

    which are shared by the z/OS user community.

    Some exam les of utilities:

    o IEBGENER Copies a sequential data set

    o IEBCOPY Copies a partitioned data set

    w

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

  • 8/12/2019 JCL material

    31/33

    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 arameters for z/OS

    and some program products. SYS1.LINKLIB Many of the basic execution

    .

    SYS1.LPALIB System execution modules

    that are loaded into the linkpack area at z/OS initialization.

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

  • 8/12/2019 JCL material

    32/33

    Introduction to the new mainframe

    Summary

    as c conta ns t ree statements: , , an .

    A program can access different groups of data sets in different

    obs b chan in the JCL for each ob.

    New data sets can be created through JCL by using the

    DISP=NEW parameter.

    sers norma y use proce ures or more comp ex o s.

    cataloged procedure is written once and can then be used bymany users.

    z/OS supplies many JCL procedures, and locally-written ones

    can be added easily.

    a JCL procedure to supply the parameters (usually DD

    statements) needed for a specific job.

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

  • 8/12/2019 JCL material

    33/33

    Introduction to the new mainframe

    Summary - continued

    s a pane nter ace or v ew ng t e system og an t e st

    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,

    .

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