0% found this document useful (0 votes)
27 views46 pages

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

ff

Uploaded by

Bhavneet Nanda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views46 pages

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

ff

Uploaded by

Bhavneet Nanda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 46

Introduction to z/OS Basics

Chapter 6: Using Job Control Language (JCL) and


System Display and Search Facility (SDSF)

Click to add text

© 2006 IBM Corporation


Chapter 06 JCL and SDSF

Chapter 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

© 2006 IBM Corporation


2
Chapter 06 JCL and SDSF

Key terms in this chapter

 concatenation record format (RECFM)


 DD statement system display and search
 job control language facility (SDSF)
(JCL) step name
 JOB statement system catalog
 EXEC statement system library
 job name utility
 procedure (PROC)

© 2006 IBM Corporation


3
Chapter 06 JCL and SDSF

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

© 2006 IBM Corporation


4
Chapter 06 JCL and SDSF

Basic JCL coding syntax


JCL must be uppercase
Forward slash in column 1 and 2
Name (1-8 characters) followthe slashes
Space separators

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

© 2006 IBM Corporation


5
Chapter 06 JCL and SDSF

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

© 2006 IBM Corporation


6
Chapter 06 JCL and SDSF

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.
© 2006 IBM Corporation
7
Chapter 06 JCL and SDSF

JCL: JOB statement

CreateamemberusingISPFedit
CreateJC Lstatements
JO Bstatement
Accountinginformation
Executionclasses

© 2006 IBM Corporation


8
Chapter 06 JCL and SDSF

JCL: EXEC statement

EXEC statement
Region size

© 2006 IBM Corporation


9
Chapter 06 JCL and SDSF

JCL: DD statement

DDstatem ent
DDnam e(referencedintheprogram)
DSN =(thedataset nam eascatalogedondisk)

© 2006 IBM Corporation


10
Chapter 06 JCL and SDSF

Specifying a data set disposition(DISP):

 DISP is an operand of the DD statement


 DISP indicates what to do with the data set at step
start, end, or abnormal end
 DISP helps to prevent unwanted simultaneous
access to data sets, which is very important for
general system operation.

© 2006 IBM Corporation


11
Chapter 06 JCL and SDSF

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

© 2006 IBM Corporation


12
Chapter 06 JCL and SDSF

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.Explain DCB

© 2006 IBM Corporation


13
Chapter 06 JCL and SDSF

Continuation and concatenation

 Needed to overcome the limitations of the old 80-


column punched cards.
– Continuation allows a JCL statement to span multiple
records.
– Concatenation allows a single ddname to have
multiple DD statements.

© 2006 IBM Corporation


14
Chapter 06 JCL and SDSF

Continuation and concatenation (example)

Continuation example // note the comma at end of card


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

© 2006 IBM Corporation


15
Chapter 06 JCL and SDSF

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

© 2006 IBM Corporation


16
Chapter 06 JCL and SDSF

JCL procedures (continued)


//MYJOB JOB 1
//*---------------------------------*
//MYPROC PROC // definition start
//MYSORT EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=&SORTDSN // define variable
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
// PEND // end of definition
//*---------------------------------*
//STEP1 EXEC MYPROC,SORTDSN=IBMUSER.AREA.CODES // use of it
//SYSIN DD *
SORT FIELDS=(1,3,CH,A)

© 2006 IBM Corporation


17
Chapter 06 JCL and SDSF

JCL procedures (continued)


//MYJOB JOB 1
//*---------------------------------*
//MYPROC PROC // definition start
//MYSORT EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=&SORTDSN // define variable
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
// PEND // end of definition
//*---------------------------------*
//STEP1 EXEC MYPROC,SORTDSN=IBMUSER.AREA.CODES // use of it
//SYSIN DD *
SORT FIELDS=(1,3,CH,A)

© 2006 IBM Corporation


18
Chapter 06 JCL and SDSF

JCL procedures -- statement override


//MYJOB JOB 1
//*---------------------------------*
//MYPROC PROC
//MYSORT EXEC PGM=SORT // mysort is step name
//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, // override sortout
// 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)

© 2006 IBM Corporation


19
Chapter 06 JCL and SDSF

JCL procedures -- statement override


//MYJOB JOB 1
//*---------------------------------*
//MYPROC PROC
//MYSORT EXEC PGM=SORT // mysort is step name
//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, // override sortout
// 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)

© 2006 IBM Corporation


20
Chapter 06 JCL and SDSF

System Display and Search Facility (SDSF) - OPTIONAL

 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.

 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

© 2006 IBM Corporation


22
Chapter 06 JCL and SDSF

Tasks and SDSF Panels

© 2006 IBM Corporation


23
Chapter 06 JCL and SDSF

SDSF panel hierarchy

© 2006 IBM Corporation


24
Chapter 06 JCL and SDSF

SDSF Panel Names

© 2006 IBM Corporation


25
Chapter 06 JCL and SDSF

SDSF HELP facility

© 2006 IBM Corporation


26
Chapter 06 JCL and SDSF

Screen Attributes

© 2006 IBM Corporation


27
Chapter 06 JCL and SDSF

SDSF: Primary option menu

© 2006 IBM Corporation


28
Chapter 06 JCL and SDSF

SDSF: Options menu

© 2006 IBM Corporation


29
Chapter 06 JCL and SDSF

Viewing the JES2 output files


Screen1

Screen2

© 2006 IBM Corporation


30
Chapter 06 JCL and SDSF

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

© 2006 IBM Corporation


31
Chapter 06 JCL and SDSF

SDSF: Display active users (DA) - PREFIX your


tsoid*

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

© 2006 IBM Corporation


32
Chapter 06 JCL and SDSF

Operator Extension

SDSF DA MVSA DEMOMVS PAG 0 SIO 563 CPU 15/ 15 LINE 1-17 (282)

COMMAND INPUT ===> / SCROLL ===> PAGE

/d u,dasd,online
/d a,l

© 2006 IBM Corporation


33
Chapter 06 JCL and SDSF

Issuing MVS and JES commands

Note: You have to be in ISPF/SDSF for this option (SDSF can run native in TSO)

© 2006 IBM Corporation


34
Chapter 06 JCL and SDSF

SDSF: Input queue panel

© 2006 IBM Corporation


35
Chapter 06 JCL and SDSF

SDSF: Output queue panel

© 2006 IBM Corporation


36
Chapter 06 JCL and SDSF

SDSF: Held output queue panel

© 2006 IBM Corporation


37
Chapter 06 JCL and SDSF

SDSF: Status panel

© 2006 IBM Corporation


38
Chapter 06 JCL and SDSF

Utilities
 z/OS includes a number of programs useful in batch processing
called utilities.
 Utilities provide many small, obvious, and useful functions.
 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

© 2006 IBM Corporation


39
Chapter 06 JCL and SDSF

IEBGENER (Sequential Copy / Generate Dataset)


 You can use IEBGENER to perform the following tasks:
 * Create a backup copy of a sequential data set, a member of a partitioned data set or
PDSE or a UNIX system services (USS) file such as a HFS file.
 * Produce a partitioned data set or PDSE, or a member of a partitioned data set or
PDSE, from a sequential data set or a USS file.
 * Expand an existing partitioned data set or PDSE by creating partitioned members
and merging them into the existing data set.
 * Produce an edited sequential or partitioned data set or PDSE.
 * Manipulate data sets containing double-byte character set data.
 * Print sequential data sets, members of partitioned data sets or PDSEs or USS
files.
 * Reblock or change the logical record length of a data set.

 * Copy user labels on sequential output data sets.


//PRINT JOB ... Print a sequential
//STEP1 EXEC PGM=IEBGENER dataset to printer
or back to terminal
//SYSPRINT DD SYSOUT=A
//SYSIN DD DUMMY
//SYSUT1 DD DSNAME=ZUSER01.D80.DATA,DISP=SHR
//SYSUT2 DD SYSOUT=A
//*SYSUT2 DD SYSOUT=T Note: comment card in JCL
© 2006 IBM Corporation
40
Chapter 06 JCL and SDSF

IEBCOPY (Library Copy) Utility


 IEBCOPY is a data set utility that is used to copy or merge members between one
or more partitioned data sets, or partitioned data sets extended (PDSEs), in full or
in part.
 You can also use IEBCOPY to create a backup of a partitioned data set into
a sequential data set (called an unload data set or PDSU), and to copy members
from the backup into a partitioned data set.
//COMPRESS EXEC PGM=IEBCOPY
//*
//A DD DSNAME=‘ZUSER01.JCL.CNTL',DISP=OLD
//B DD DSNAME=‘ZUSER01.JCL.CNTL',DISP=OLD
//*
//SYSIN DD *
COPY OUTDD=B,INDD=A

© 2006 IBM Corporation


41
Chapter 06 JCL and SDSF

VSAM – Access Method Services (IDCAMS)


When you want to use an access method services function, you issue a command and specify its parameters. Your request is
decoded, one command at a time, and the appropriate functional routines are then called to perform all services required by
that command.
You can invoke the access method services program in three ways:

As a job or job step


From a TSO terminal
From within your own program

You can execute the IDCAMS program and include the command and its parameters as input to the
program. You can also call the IDCAMS program from within another program and pass the command and
its parameters to the IDCAMS program.

//YOURJOB JOB YOUR INSTALLATION'S JOB=ACCOUNTING DATA


//JOBCAT DD DSNAME=YOUR.CATALOG,DISP=SHR
//STEP1 EXEC PGM=IDCAMS
//STEPCAT DD DSNAME=ANOTHER.CATALOG,DISP=SHR
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
(access method services commands and their parameters) ===> See next slide for commands
/*
//

© 2006 IBM Corporation


42
Chapter 06 JCL and SDSF

Examples of IDCAMS Commands

© 2006 IBM Corporation


43
Chapter 06 JCL and SDSF

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.

© 2006 IBM Corporation


44
Chapter 06 JCL and SDSF

Submitting a Job for execution

 The Basic Environment:


> Input Queue
> Job Initiator - processes JCL, sets up proper environment
in an address space, and then runs the batch job
> Output Queue (Sysout = ...)
 Job submission is managed by the Job Entry Subsystems
(JES2 or JES3) JES2 dominates ... a.k.a. Spooling system
 JES provides jobs to Initiators, and controls output devices
(usually printers)

© 2006 IBM Corporation


45
Chapter 06 JCL and SDSF

Summary

 Basic JCL contains three statements: JOB, EXEC, and DD.


 A program can access different 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.

© 2006 IBM Corporation


46
Chapter 06 JCL and SDSF

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.

© 2006 IBM Corporation


47

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy