0% found this document useful (0 votes)
21 views33 pages

CH 6 Slides

Chapter 6 introduces Job Control Language (JCL) and the System Display and Search Facility (SDSF) for managing jobs on the mainframe. It covers the basic JCL statements (JOB, EXEC, DD), coding techniques, and how to create and submit jobs, as well as monitor their output using SDSF. Additionally, it discusses utilities and system libraries that support batch processing in z/OS.

Uploaded by

balaji
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)
21 views33 pages

CH 6 Slides

Chapter 6 introduces Job Control Language (JCL) and the System Display and Search Facility (SDSF) for managing jobs on the mainframe. It covers the basic JCL statements (JOB, EXEC, DD), coding techniques, and how to create and submit jobs, as well as monitor their output using SDSF. Additionally, it discusses utilities and system libraries that support batch processing in z/OS.

Uploaded by

balaji
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

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

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 • 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)

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


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 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=[Link]
//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
SYSOUTWhere 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=[Link]

© 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 (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=[Link]
//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=[Link]
//[Link] DD DSN=[Link],
// 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, 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

© 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:

• [Link] JCL procedures distributed


with z/OS
• [Link] Control parameters for z/OS
and some program products.
• [Link] Many of the basic execution
modules of the system.
• [Link] 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.

You might also like