JCL Utilities
JCL Utilities
Version
1.0
TCS Public
JCL Utilities
Introduction:Mainframe utilities are a set of tried and tested programs that perform a variety of
useful functions which assist in organizing and maintaining data in a mainframe
environment.
They are mainly classified into two.
1. Dataset Utilities
2. System Utilities.
IEBCOMPR
IEBCOPY
IEBEDIT
IEBGENER
IEBPTPCH
IEBUPDTE
IDCAMS
IEBDG
IEBIMAGE
IEBISAM
Dummy Utility:
IEFBR14
System Utilities:
IEHLIST
IEHMOVE
Internal Use
JCL Utilities
IEHPROGM
ICKDSF
IEHINITT
DD Names:These utilities are usually invoked via Job Control Language (JCL). They tend to use
common JCL DD identifiers for their data sets:
SYSIN
input file for the 'commands' for the utility. Often set to DUMMY if
the default action is desired.
SYSUT1
input file.
SYSUT2
output file.
SYSUT3
SYSUT4
SYSPRINT
SYSOUT
Internal Use
JCL Utilities
When comparing sequential data sets, IEBCOMPR considers the data sets equal if
the following conditions are met:
For partitioned data sets, IEBCOMPR considers the data sets equal if the following
conditions are met:
The directory entries for the two partitioned data sets match - that is, the
names are the same, and the number of entries is equal.
Sample JCL:In the following example, the datasets mentioned against SYSUT1 and SYSUT2 are
compared.
//*
//STEP0010 EXEC PGM=IEBCOMPR
//COMPANY DD DSN=PGL.DFSS.UU.COMPANY,DISP=SHR
//SYSOUT
DD SYSOUT=*
Internal Use
JCL Utilities
//SYSPRINT DD SYSOUT=*
//SYSUT1
DD DISP=SHR,DSN=TFDQ.DFSS.TEST.FILE1
//SYSUT2
DD DISP=SHR,DSN=TFDQ.DFSS.TEST.FILE2
//SYSIN
DD DUMMY
/*
IEBCOMPR is not a very flexible or user-friendly compare program. It can't restrict
the comparison to only certain columns, it can't ignore differences in white space, it
doesn't tell you where in the record the difference occurs, and it halts after 10
differences. On the other hand, it is fast, and it is present on all IBM mainframes. So
it is very useful in comparing load modules, or checking that a copy worked properly.
For comparisons of programs or reports, the ISPF SuperC (ISRSUPC) compare
program is often used instead.
IEBCOPY:IEBCOPY copies, compresses and merges partitioned data sets. It can also select or
exclude specified members during the copy operation, and rename or replace
members.
Some of the tasks that IEBCOPY can perform include the following:
Copying a PDS in place to reclaim the unused space from deleted members;
also called compressing a PDS.
The IEBCOPY utility differs from the other IEB-type utilities in that the DD names of
the input and output DD statements are defined in the user commands as opposed to
using the standard SYSUT1 and SYSUT2 DD names.
Sample JCL:For the IEBCOPY utility, the required job control statements are as follows:
Internal Use
DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//INFILE
DD DSN=TFDQ.DPSS.CC.M1.COB,
//
DISP=SHR
//OUTFILE DD
//
DSN=TFDQ.DPSS.CC.M1.COB.TEST,
DISP=SHR
//SYSIN
DD *
COPY1 C O=OUTFILE,I=((INFILE,R))
SELC1 S M=ARCAFX,D4DATA
/*
In the above example members ARCAFX, D4DATA will be copied from
TFDQ.DPSS.CC.M1.COB to TFDQ.DPSS.CC.M1.COB.TEST.
Any valid DD Names can be used for the two DD statements. These DD names are
specified in the utility control statements to tell IEBCOPY the name of the input and
output data sets.
An entire job or jobs, including JOB statements and any associated JOBLIB
or JOBCAT statements, and JES2 or JES3 control statements.
Selected job steps, including the JOB statement, JES2 or JES3 control
statements following the JOB statement, and any associated JOBLIB or
JOBCAT statements.
TCS Public
JCL Utilities
DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT1
DD DISP=SHR,DSN=TFDQ.DPSS.M1.JCL(AGCYEXTR)
//SYSUT2
DD SYSOUT=*
//SYSIN
DD *
EDIT TYPE=INCLUDE,STEPNAME=(STEP0010,STEP0020)
/*
In the above example, STEP0010 and STEP0020 of the JCL in the dataset
TFDQ.DPSS.M1.JCL(AGCYEXTR) would be copied to the dataset given in
SYSTUT2 (Instead of SYSOUT, a Dataset name can be given here).
Changing the physical block size or logical record length of a sequential data
set.
Creating partitioned output data set from sequential input data set.
Internal Use
JCL Utilities
DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT1
DD DISP=SHR,DSN=TFDQ.DFSS.DD.TRAN.REPORT
//SYSUT2
DD DSN=TFDQ.DFSS.DD.TRAN.REPORT.COPY,
//
DISP=(,CATLG,DELETE),
//
SPACE=(TRK,(100,200),RLSE),
//
RECFM=FB,LRECL=154,BLKSIZE=0
//SYSIN
DD DUMMY
For straight copy tasks, the sort program can often do these faster than IEBGENER.
Thus many mainframe shops make use of an option that automatically routes such
tasks to the sort ICEGENER program instead of IEBGENER.
Sample JCL:An example of an IEBPTPCH program to dump a PDS file to a flat file:
//STEP0020 EXEC PGM=IEBPTPCH
Internal Use
JCL Utilities
//COMPANY DD DSN=PGL.DFSS.UU.COMPANY,DISP=SHR
//SYSOUT
DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT1
DD DSN=TFDQ.TEST.IEB.PDS.FILE,DISP=SHR
//SYSUT2
DD DSN=TFDQ.TEST.IEB.FLAT.FILE,
//
DISP=(,CATLG,DELETE),
//
SPACE=(TRK,(100,200),RLSE),
//
RECFM=FB,LRECL=80,BLKSIZE=0
//SYSIN
DD *
PUNCH TYPORG=PO
/*
IEBUPDTE:The IEBUPDTE utility is used to maintain source libraries. Some of the functions that
IEBUPDTE can perform include the following:
IEBUPDTE reads the input data set from either the SYSUT1 DD statement or
from the SYSIN DD statement.
Internal Use
JCL Utilities
//JS10
EXEC PGM=IEBUPDTE,REGION=1024K,
//
PARM='MOD'
//SYSPRINT
DD SYSOUT=*
//SYSUT1
DD DISP=SHR,DSN=TFDQ.DPSS.CC.M1.COB.TEST
//SYSUT2
DD DSN=TFDQ.DPSS.CC.M1.COB.TEST.NEW,
//
DISP=(NEW,CATLG),SPACE=(TRK,(10,,10)),
//
DCB=(RECFM=F,LRECL=80,BLKSIZE=0)
//SYSIN
DD
./
REPRO
./
ADD
./
NUMBER
DATA
NAME=ARCAFX,LEVEL=00,SOURCE=1,LIST=ALL
NAME=EXIT,LEVEL=00,SOURCE=1,LIST=ALL
NEW1=10,INCR=100
ENDUP
/*
IDCAMS:IDCAMS ("Access Method Services") is used primarily to define and manage VSAM
data sets and integrated catalog facility catalogs.
An access method defines the technique that is used to store and retrieve data.
Access methods have their own data set structures to organize data, systemprovided programs (or macros) to define data sets, and utility programs to process
data sets. VSAM (Virtual Sequential Access Method) is an access method used for
more complex applications. VSAM arranges records by an index key, relative record
number, or relative byte addressing.
Internal Use
10
JCL Utilities
Sample JCL:In the following example, the data in the Physical Sequential file
T4.DFSS.M1.AGNCY.EXTR.SRTD.AGNMS will be loaded to the Keyed VSAM file
T4.DKSS.AG.NAMES.
//STEP0060 EXEC PGM=IDCAMS
//COMPANY DD DSN=PGL.DFSS.UU.COMPANY,DISP=SHR
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//INFILE
DD DISP=SHR,DSN=T4.DFSS.M1.AGNCY.EXTR.SRTD.AGNMS
//OUTFILE
DD DISP=OLD,DSN=T4.DKSS.AG.NAMES
//SYSIN
DD *
REPRO
INFILE(INFILE) OUTFILE(OUTFILE)
/*
Many of IDCAMS functions can be entered as TSO commands. For example,
DEFINE CLUSTER can be used as a TSO command. However, using IDCAMS in
this manner is generally not recommended because these commands can be
complex and the errors encountered can be complex. Entering the IDCAMS
commands through a batch job allows the commands and resulting messages to be
reviewed as often as necessary by using SDSF to view the output.
IEBDG:IEBDG is a data set utility used to provide a pattern of test data to be used as a
programming debugging aid. This pattern of data can then be analyzed quickly for
predictable results.
You can create a data set without supplying any input data, or you can specify a data
set from which input data is to be taken. The data set you create may have records of
any format. Sequential or ISAM data sets, or members of partitioned data sets or
PDSEs, can be used for input or output.
IEBDG also gives you the option of specifying your own exit routine for monitoring
each output record before it is written.
When you define the contents of a field, the following must be decided:
Which pattern is to be placed initially in the defined field. You can use your
own pattern, or a pattern supplied by IBM
Internal Use
11
JCL Utilities
What action, if any, is to be performed to alter the contents of the field after it
is selected for each output record.
IEBIMAGE:IEBIMAGE is a data set utility that creates and maintains the following types of IBM
3800 Printing Subsystem and IBM 4248 printer modules and stores them in a library.
Some of the functions that IEBIMAGE can perform include the following:
Forms control buffer modules for the 3800 and 4248 that specify controls for
the vertical line spacing and any one of 12 channel codes per line.
Copy modification modules for the 3800 that specify data that is to be printed
on every page for specified copies of the output data set.
Character arrangement table modules for the 3800 that translate the input
data into printable characters and identify the associated character sets and
graphic character modification modules.
Graphic character modification modules for the 3800 that contain the scan
patterns of characters you design or characters from IBM-supplied modules.
Library character set modules for the 3800 that contain the scan patterns of
character sets you define or IBM-supplied character sets.
The IEBIMAGE program creates and maintains all modules required for use on the
3800 Model 1 and Model 3 printers. The program default is to build these modules in
the 3800 Model 1 format; however, 3800 Model 3 compatibility can be specified with
IEBIMAGE utility control statements.
You can also use IEBIMAGE to create and maintain FCB modules for the 4248
printer. These modules are compatible with the 3262 Model 5 printer; however, the
3262 Model 5 does not support variable printer speeds or the horizontal copy feature
of the 4248. Unless otherwise stated, where a reference to the 4248 printer is used in
this chapter, the 3262 Model 5 can be substituted.
IEBISAM:It is recommended that ISAM data sets be converted VSAM for optimal use of
DFSMS. VSAM is faster and more reliable. ISAM data sets cannot be SMSmanaged.
You can use access method services to allocate a VSAM key-sequenced data set
and copy an ISAM data set into it. Access method services are also used to
Internal Use
12
JCL Utilities
manipulate VSAM key-sequenced data sets. See DFSMS/MVS Using Data Sets and
the REPRO command in DFSMS/MVS Access Method Services for ICF for
information on converting ISAM data sets to VSAM key-sequenced data sets.
You can use IEBISAM to:
Copy an indexed sequential (ISAM) data set directly from one DASD volume
to another.
Create an ISAM data set from an unloaded data set. The sequential
(unloaded) data set is in a form that can be subsequently loaded, that is, it
can be converted back into an ISAM data set.
IEFBR14:This is a dummy program, normally inserted to JCL when the only desired action is
allocation or deletion of datasets.
The calling sequence for OS/360 contained the return address in Register 14. A
branch to Register 14 would thus immediately exit the program. However, before and
after executing this program, the operating system would allocate & deallocate
datasets as specified in the DD statements, so it is commonly used as a quick way to
set up or remove datasets.
Sample JCL:To allocate a dataset:
//STEP0010
//COMPANY
//SYSOUT
//SYSPRINT
//NEWDD
//
//
//
EXEC PGM=IEFBR14
DD DSN=PGL.DFSS.UU.COMPANY,DISP=SHR
DD SYSOUT=*
DD SYSOUT=*
DD DSN=T4.DFSS.IEF.TEST.FILE,
DISP=(,CATLG,DELETE),
SPACE=(TRK,(100,200),RLSE),
RECFM=FB,LRECL=80,BLKSIZE=0
To delete a dataset:
//*
//STEP0010 EXEC PGM=IEFBR14
Internal Use
13
JCL Utilities
//COMPANY
//SYSOUT
//SYSPRINT
//DELDD
//
//*
DD
DD
DD
DD
DSN=PGL.DFSS.UU.COMPANY,DISP=SHR
SYSOUT=*
SYSOUT=*
DSN=T4.DFSS.IEF.TEST.FILE,
DISP=(MOD,DELETE,DELETE)
IEHLIST:This is a dummy program, normally inserted to JCL when the only desired action is
allocation or deletion of datasets.
The calling sequence for OS/360 contained the return address in Register 14. A
branch to Register 14 would thus immediately exit the program. However, before and
after executing this program, the operating system would allocate & deallocate
datasets as specified in the DD statements, so it is commonly used as a quick way to
set up or remove datasets.
IEHLIST is a utility used to list entries in a Partitioned Dataset (PDS) directory or to
list the contents of a Volume Table of Contents (VTOC).
Sample JCL:An example of an IEHLIST program:
JCL to list the directory of TFDQ.DPSS.CC.M1.COB which resides on volume
UU7205
//STEP0010 EXEC PGM=IEHLIST
//COMPANY DD DSN=PGL.DFSS.UU.COMPANY,DISP=SHR
//SYSOUT
DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//DS1
DD DSN=TFDQ.DPSS.CC.M1.COB,
//
DISP=OLD
//SYSIN
DD *
LISTPDS DSNAME=(TFDQ.DPSS.CC.M1.COB),VOL=3390=UU7205
/*
Internal Use
14
JCL Utilities
IEHMOVE:IEHMOVE moves or copies collections of data. However, IBM does not recommend
using the IEHMOVE utility in a DFSMS environment. A move differs from a copy in
that during a move the original data set is deleted, or scratched.
Some of the tasks that IEHMOVE can perform include the following:
On the surface, IEHMOVE may seen redundant to the IEBGENER and IEBCOPY
utilities. However, IEHMOVE is more powerful. The main advantage of using
IEHMOVE is that you do not need to specify space or DCB information for the new
data sets. This is because IEHMOVE allocates this information based on the existing
data sets.
Another advantage of IEHMOVE is that you can copy or move groups of data sets as
well as entire volumes of data. Because of the ease in moving groups of data sets or
volumes, the IEHMOVE utility is generally favored by system programmers.
The DD statements for IEHMOVE, other than SYSPRINT and SYSIN, refer to DASD
or tape volumes instead of individual data sets. However, referencing volumes can
pose a problem, since specifying DISP=OLD gains exclusive access to a volume.
Therefore, while your IEHMOVE job runs, that entire volume (and all datasets on it) is
unavailable to other users. This is acceptable for private volumes, such as tape
volumes or mountable volumes, but unacceptable public volumes, such as DASD
volumes.
The SYSUT1 DD statement specifies a DASD volume where three work data set
required by IEHMOVE are allocated. You must specify unit and volume information
for this DD statement.
IEHPROGM:IEHPROGM builds and maintains system control data. It is also used for renaming
and scratching (deleting) a data set.
Some of the tasks that IEHPROGM can perform include the following:
Internal Use
15
JCL Utilities
EXEC PGM=IEHPROGM
DD DSN=PGL.DFSS.UU.COMPANY,DISP=SHR
DD SYSOUT=*
DD SYSOUT=*
DD UNIT=DISK,VOLUME=SER=UU7213,DISP=OLD
DD *
DSNAME=TFDQ.DFSS.IEH.TEST,VOL=3390=UU7213
Modify a DASD volume to change the volume serial number and owner
information.
IEHINITT:IEHINITT is an IBM utility used to write labels on tape volumes. For 7-track tapes,
IEHINITT will write BCD labels. For 9-track, 18-track, or 36-track tapes, IEHINITT
can write either EBCDIC or ASCII labels. The ASCII labels are in ISO/ANSI/FIPS
format. Any number of tape cartridges or tape volumes can be labeled in a single
execution of IEHINITT.
Multiple tape volumes initialized via a single INITT command are labeled in
sequential order by specifying a serial number to be written on the first tape volume.
Internal Use
16
JCL Utilities
The serial number must be specified as six numeric characters, and is incremented
by 1 for each successive tape volume. If only one tape volume is to be labeled, the
specified serial number can be either numeric or alphanumeric.
Internal Use
17