0% found this document useful (0 votes)
406 views

JCL Utilities

IEB utilities are a set of mainframe programs that perform useful functions like organizing, maintaining, copying, comparing and printing dataset. This document provides an overview of common IEB utilities like IEBCOMPR, IEBCOPY, IEBEDIT, IEBGENER, IEBPTPCH and IEBUPDTE and includes their usage with examples.

Uploaded by

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

JCL Utilities

IEB utilities are a set of mainframe programs that perform useful functions like organizing, maintaining, copying, comparing and printing dataset. This document provides an overview of common IEB utilities like IEBCOMPR, IEBCOPY, IEBEDIT, IEBGENER, IEBPTPCH and IEBUPDTE and includes their usage with examples.

Uploaded by

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

JCL Utilities

Version
1.0

Total Number of Pages:


018

TATA Consultancy Services


Chennai
January 2010
Author : Sivaraman K L([email protected])

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.

Naming:The first three characters (IEF/IEB/IEH) derive from a convention on Mainframe


computers that programs supplied by IBM were grouped together by function or
creator and that each group shared a three-letter prefix.
In OS/360, the first letter was almost always "I" and the programs produced by the
scheduler group used the prefix "IEF". Similarly, "IEB" was used for dataset utility
programs, "IEH" for system utility programs, and "IEW" for program-linkage and loading.
Dataset 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

work (spill) file for input (SYSUT1) (often not used).

SYSUT4

work (spill) file for output (SYSUT2) (often not used).

SYSPRINT

output file for messages from the utility.

SYSOUT

output file for printed output from the utility.

SYSUDUMP output file for a system 'dump' if the program fails.

Internal Use

JCL Utilities

IEBCOMPR:IEBCOMPR compares records in sequential or partitioned data sets.


The IEBCOMPR utility is used to compare two sequential or partitioned datasets.
This data set comparison is performed at the logical record level. Therefore,
IEBCOMPR is commonly used to verify that a backup copying of a data set is
current.
During processing, IEBCOMPR compares each record from each data set, one by
one. If the records are unequal, IEBCOMPR lists the following information in the
SYSOUT:

The record and block numbers in question.

The names of the DD statements in which the inconsistency occurred.

The unequal records.

When comparing sequential data sets, IEBCOMPR considers the data sets equal if
the following conditions are met:

The data sets contain the same number of records.

The corresponding records and keys are identical.

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.

The corresponding members contain the same number of records.

The corresponding records and keys are identical.

If ten unequal comparisons are encountered during processing, IECOMPR


terminates with the appropriate message.

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:

Creating a backup of a partitioned data set (PDS)

Copying a PDS in place to reclaim the unused space from deleted members;
also called compressing a PDS.

Copying selected members to another PDS.

Renaming selected members of a PDS.

Merging multiple partitioned data sets into a single PDS.

Altering, copying and reblocking load modules.

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

//STEP0010 EXEC PGM=IEBCOPY


//COMPANY DD DSN=PGL.DFSS.UU.COMPANY,DISP=SHR
//SYSOUT

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.

IEBEDIT:IEBEDIT selectively copies portions of JCL.


The program can copy:

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

Sample JCL:Following is an example for usage of IEBEDIT utility:


//STEP0001 EXEC PGM=IEBEDIT
//COMPANY DD DSN=PGL.DFSS.UU.COMPANY,DISP=SHR
//SYSOUT

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

IEBGENER:IEBGENER copies records from a sequential dataset, or creates a partitioned


dataset.
Some of the tasks that IEBGENER can perform include the following:

Creating a backup of a sequential data set or a member of a PDS.

Changing the physical block size or logical record length of a sequential data
set.

Creating an edited data set.

Printing a sequential data set or a member of a PDS.

Creating partitioned output data set from sequential input data set.

Internal Use

JCL Utilities

Sample JCL:An example of an IEBGENER program to copy one dataset to another:


//STEP0020 EXEC PGM=IEBGENER
//COMPANY DD DSN=PGL.DFSS.UU.COMPANY,DISP=SHR
//SYSOUT

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.

IEBPTPCH:IEBPTPCH ("PrinT and PunCH") prints or punches records from a sequential or


partitioned dataset.
Some of the tasks that IEBPTPCH can perform include the following:

Printing or punching an entire data set, sequential or partitioned (PDS).

Printing or punching selected PDS members.

Printing or punching selected records from a sequential or partitioned data


set.

Printing or punching a PDS directory.

Printing or punching an edited version of a sequential data set or PDS.

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:

Creating and updating libraries

Modifying sequential data sets or PDS members

Changing the organization of a data set from sequential to partitioned or from


partitioned to sequential.

IEBUPDTE is commonly used to distribute source libraries from tape to DASD.


This utility uses the same job control statements required by most IEB-type utilities.
The only exceptions are as follow:

IEBUPDTE accepts a PARM parameter coded on the EXEC statement, NEW


or MOD. NEW indicates that the utility control statements and the input data
are contained in the SYSIN DD statement, so no SYSIN1 DD statement is
needed. MOD indicates that the SYSIN DD statement contains only utility
control statements, without input data. Therefore, the SYSUT1 DD statement
is required to define the input data set.

IEBUPDTE reads the input data set from either the SYSUT1 DD statement or
from the SYSIN DD statement.

Internal Use

JCL Utilities

Sample JCL:In the following example a new library FDQ.DPSS.CC.M1.COB.TEST.NEW will be


allocated and member ARCAFX from FDQ.DPSS.CC.M1.COB.TEST will be copied
to it. Also, another member by the name EXIT will be inserted to this new library. The
content of the member EXIT will just be '(DATA RECORDS FOR EXIT MEMBER)'.

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

(DATA RECORDS FOR EXIT MEMBER)


./

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 a backup (transportable) copy of an ISAM data set by copying


(unloading) it into a sequential data set on a DASD or magnetic tape volume.

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.

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

Moving or copying sequential and partitioned data sets

Moving or copying multi - volume data sets

Moving an entire volume of data sets.

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:

Deleting (scratching) a data set or PDS member.

Renaming a data set or PDS member.

Internal Use

15

JCL Utilities

Cataloging or uncataloging a data set.

Maintaining data set passwords.

Sample JCL:A sample IEHPROGM job:


JCL to scratch a Dataset residing on a particular volume.
//STEP0010
//COMPANY
//SYSOUT
//SYSPRINT
//DD1
//SYSIN
SCRATCH
/*

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

IEHPROGM:ICKDSF is a generalized utility used to perform the following functions on direct


access storage devices (DASD):

Make a DASD volume available for operating system user.

Scan a DASD volume for malfunctions.

Modify a DASD volume to change the volume serial number and owner
information.

Scan a DASD drive for malfunctions.

Performs tests on a volume to determine data reliability.

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

You might also like