Thursday, November 4, 2010
More Utility Programs
This program really duplicates the functions of IEBGENER and IEBCOPY. It creates copies of
sequential or partioned files. There are several advantages to use IEHMOVE over IEBGENER, which can be found, once you are familiar using both the utilities.
IEHPROGM
Its primary purpose is to catalog, uncatalog, scratch, rename datasets. It can also create index for a generation data group.
SORT/MERGE
This program can sort or merge the records of standard sequential files.
IEHLIST
IEFBR14
IEBUPDTE
this utility is used to perform the following functions:
•Create a new source library
•Add a new member to a source library
•Change an existing library member
•Catalog a JCL procedure
Although this utility can perform some other functions, these are the most commonly needed activities performed by this utility. The use of this utility is limited to the staff members who are responsible for the source library management. This utility was extensively used when most of the mainframes also used IBM source management package called SOURCE or some other in-house developed source management package, which will respond to this utility. After development of highly resourceful library management software packages, such as PANVALET, LIBRARIAN, ENDEVOR, SCLM, SRCEPARK, most of the information technology departments do not see any need to use this utility. Concerning cataloging a JCL procedure, IEBGENER is mostly used by production support staff with proper authority to update the production library for the installations, who use a PDS to store all their production procs, jcls, sysin members. It also has a drawback because of its inability to delete anything from the source library. This utility is rarely used in a data processing shop these days, since a large volume of shops stopped using IBM SOURCE Management package for a number of years. This current trend of non-IBM source management package has significantly reduced the use of this utility.
This utility uses four standard DD statements. SYSPRINT usually defines the system message files like any other job. SYSUT1 and SYSUT2 defines the library before processing and after processing, which normally remains the same, since when an add, replace operation occurs, the library remains the same, and the necessary control statements. Since we are using Source Control Library Management(SCLM) in this project, there is no possibility for this utility to be used. A handout may be distributed at a later date.
IEBPTPCH
This program is used to print or punch sequential or partitioned dataset. This program is not much in use these days when card input has been virtually eliminated from the industry
· Print a sequential file or a member of a PDS
· Punch a sequential file or a member of a PDS
· Format the printed or punched output
This utility prints a sequential file or a member or a PDS, which is again a sequential file itself. This can be easily done by IEBGENER at this time.
This utility was very much in use, approximately in the sixties or mid-seventies, when keypunch cards were used as input or output data. A flat file could be converted into a pack of 80-column card output to be taken elsewhere for any further processing. A flat file could also be created on the disk using 80-column card input. A stack of cards could be converted into a printed output which assisted the programmer to have a better desk check whether any card has been punched wrong. The use of this utility has been reduced drastically after the elimination of cards from the data-processing industry.
The following JCLs will give a reasonable idea about how this utility was used.
//GP4ABC JOB (RR, 1235,,,,8,,U),’MR. XYZ’,CLASS=S,
// MSGCLASS=G,MSGLEVEL=1,NOTIFY=GP4ABC
//***********************************************************
//* THIS PROGRAM PRINTS A FLAT FILE.
//***********************************************************
//STEP1 EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=TSCBAXC.ANNSALES.DATA,DISP=SHR
//SYSUT2 DD SYSOUT=*
//SYSIN DD *
In this example,
SYSUT1 is the input data
SYSUT2 is the output data, which will go to print
PRINT is the control statement which communicates to the utility about what kind of processing needs to be done.
//***********************************************************
//* THIS PROGRAM CREATES A PUNCHED OUTPUT FROM A FLAT //* FILE.
//***********************************************************
//STEP2 EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=TSCBAXC.ANNSALES.DATA,DISP=SHR
//SYSUT2 DD SYSOUT=*
//SYSIN DD *
PUNCH TYPORG=PS
In this example,
SYSUT1 is the input data
SYSUT2 is the output data, which will go to print
PUNCH is the control statement which communicates to the utility that a batch of punched card needs to be created from the flat file.
TYPORG=PS this control statement states that the input file is a physical sequential file.
//***********************************************************
//* THIS PROGRAM PUNCHES TWO MEMBERS OF A PDS.
//***********************************************************
//STEP1 EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=TSCBAXC.ANNSALES.DATA,DISP=SHR
//SYSUT2 DD SYSOUT=*
//SYSIN DD *
PUNCH TYPORG=
MEMBER NAME=HDRREC ç Member 1 to be printed
MEMBER NAME=TLRREC ç Member 2 to be printed
IEBISAM
IEBDG
The following is the sample of a JCL statement to execute this utility program.
//GP4ABC JOB (RR, 1235,,,,8,,U),’MR. XYZ’,CLASS=S,
// MSGCLASS=G,MSGLEVEL=1,NOTIFY=GP4ABC
//*
//***********************************************************
//* THIS PROGRAM CREATES TEST DATA AS SPECIFIED IN THE //* CONTROL STATEMENT
//***********************************************************
//STEP1 EXEC PGM=IEBDG
//SYSPRINT DD SYSOUT=*
//TSTFILE1 DD DSN=TSGBAXC.SACRED.DATA,
// DISP=(NEW,CATLG),
// UNIT=SYSDA,
// SPACE=(CYL,(20,2),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=6160)
//SYSIN DD DUMMY
DSD OUTPUT = (TSTFILE1)
FD NAME=PARTNBR,LENGTH=30,FORMAT=ZD,INDEX=1
FD NAME=REST,LENGTH=50,FORMAT=AN
CREATE QUANTITY=100,NAME=(PARTNBR,REST)
END
TSTFILE - Specifies the test file to be created and the name is specified in
DSN with all the parameters necessary for a new file, such as
DISP, UNIT, SPACE and DCB
In the control statements:
DSD Data Set Description
FD Field Description, where the first field PARTNBR is 30 Bytes long
FD Field Description, where the second field REST is 50 Bytes long
INDEX A number which needs to be included at the end of every field
CREATE QUANTITY = 100 specifies the number of records to be generated by the program and also the associated field names, such as PARTNBR and REST.
This utility has a drawback of not providing a wide variety of field contents, where the same field in two records will have entirely non-related data.
IT IS REALLY OBSOLETE THESE DAYS, SINCE ALL INSTALLATIONS DEPEND ON SOME OTHER WAYS OF CREATING TEST DATA.
IEBCOPY
The following is the sample of a JCL statement to execute this utility program.
//GP4ABC JOB (RR, 1235,,,,8,,U),’MR. XYZ’,CLASS=S,
// MSGCLASS=G,MSGLEVEL=1,NOTIFY=GP4ABC
//*
//***********************************************************
//* THIS PROGRAM COPIES ONE FILE TO A BACKUP
//***********************************************************
//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//COPYLIB DD DSN=TSGBAXC.SACRED.DATA,DISP=SHR
//BKUPLIB DD DSN=TSGBAXC.BKUP.SACRED.DATA,
// DISP=(,CATLG,DELETE),
// UNIT=DISK,
// SPACE=(CYL,(20,2),RLSE),
// DCB=(DSORG=
//SYSUT3 DD UNIT=SYSDA,
// SPACE=(TRK,(1,1))
//SYSUT4 DD UNIT=SYSDA,
// SPACE=(TRK,(1,1))
//SYSIN DD *
COPY OUTDD=BKUPLIB,INDD=COPYLIB
COPYLIB - Is the data that needs to be copied to a backup
BKUPLIB - Is the backup library where COPYLIB was copied or
backed up
SYSUT3 - IBM advised mandatory DDNAME for this process
SYSUT4 - IBM advised mandatory DDNAME for this process
OUTDD - Shows the receiving library in this process, the right
operand must match the DDNAME in the body of the
JCL.
INDD - Shows the sending library in this process, the right
operand must match the DDNAME in the body of the
JCL.
The following JCL is an example for data compression.
//GP4ABC JOB (RR, 1235,,,,8,,U),’MR. XYZ’,CLASS=S,
// MSGCLASS=G,MSGLEVEL=1,NOTIFY=GP4ABC
//*
//***********************************************************
//* THIS PROGRAM COMPRESSES THE LIBRARY WHERE UNUSED //* SPACES ARE AVAILABLE.
//***********************************************************
//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//COPYLIB DD DSN=TSGBAXC.SACRED.DATA,DISP=SHR
//SYSUT3 DD UNIT=SYSDA,
// SPACE=(TRK,(1,1))
//SYSUT4 DD UNIT=SYSDA,
// SPACE=(TRK,(1,1))
//SYSIN DD *
COPY OUTDD=COPYLIB,INDD=COPYLIB
In this example,
COPYLIB - Is the data that needs to be compressed
SYSUT3 - IBM advised mandatory DDNAME for this process
SYSUT4 - IBM advised mandatory DDNAME for this process
OUTDD - Shows the library name after compression
INDD - Shows the library name before compression, which is
same as OUTDD
It can be observed that in both the cases, the same DDNAME has been used, which IEBCOMPR will understand as a case of compression.
This utility can also be used for selective copying or backup where the whole PDS need not be copied or backed up. The control statement will prompt the utility which are the members need to be copied.
The following JCL is an example for selective copying.
//GP4ABC JOB (RR, 1235,,,,8,,U),’MR. XYZ’,CLASS=S,
// MSGCLASS=G,MSGLEVEL=1,NOTIFY=GP4ABC
//*
//***********************************************************
//* THIS PROGRAM WILL COPY ONLY DESIRED MEMBERS.
//***********************************************************
//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//COPYLIB DD DSN=TSGBAXC.SACRED.DATA,DISP=SHR
//ARXLIB DD DSN=TSGBAXC.SELECT.SACRED.DATA,
// DISP=(,CATLG,DELETE),
// UNIT=DISK,
// SPACE=(CYL,(20,2),RLSE),
// DCB=(DSORG=
//SYSUT3 DD UNIT=SYSDA,
// SPACE=(TRK,(1,1))
//SYSUT4 DD UNIT=SYSDA,
// SPACE=(TRK,(1,1))
//SYSIN DD *
COPY OUTDD=ARXLIB,INDD=COPYLIB
SELECT MEMBER= BDREC,CRMREC,ARXREC,OIREC
In this example,
COPYLIB - Is the source library
ARXLIB - Is the target library
SYSUT3 - IBM advised mandatory DDNAME for this process
SYSUT4 - IBM advised mandatory DDNAME for this process
OUTDD - Shows the receiving library DDNAME
INDD - Shows the sending library DDNAME
SELECT - Shows the desired members need to be copied or backed
up
IEBCOMPR
The following is the sample of a JCL statement to execute this utility program.
//GP4ABC JOB (RR, 1235,,,,8,,U),’MR. XYZ’,CLASS=S,
// MSGCLASS=G,MSGLEVEL=1,NOTIFY=GP4ABC
//*
//***********************************************************
//* THIS PROGRAM COMPARES TWO DATASETS.
//***********************************************************
//STEP1 EXEC PGM=IEBCOMPR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=TSGBAXC.SACRED.DATA,DISP=SHR
//SYSUT2 DD DSN=TSGBAXC.NEWCOPY.DATA,
// DISP=SHR
//SYSIN DD DSN=TSGBAXC.PARMINPUT.DATA(CMPR),
// DISP=SHR
OR
//SYSIN DD *
COMPARE TYPORG= PS
or
IEBGENER
The following is the sample of a JCL statement to execute this utility program.
//GP4ABC JOB (RR, 1235,,,,8,,U),’MR. XYZ’,CLASS=S,
// MSGCLASS=G,MSGLEVEL=1,NOTIFY=GP4ABC
//*
//***********************************************************
//* THIS PROGRAM COPIES ONE FILE TO ANOTHER.
//***********************************************************
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=TSGBAXC.SACRED.DATA,DISP=SHR
//SYSUT2 DD DSN=TSGBAXC.NEWCOPY.DATA,
// DISP=(,CATLG,DELETE),
// UNIT=DISK,
// SPACE=(CYL,(20,2),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=6160)
//SYSIN DD DUMMY
IDCAMS
For VSAM Files
2. Define a VSAM data space
3. Define a VSAM cluster
4. Delete a VSAM cluster
5. Load a VSAM file from a non-VSAM file
6. Copy a VSAM File
7. Print a VSAM File
8. List the entries for a VSAM Catalog
9. Scratch(delete) a VSAM File
For Non-VSAM Files
1. Copy a non-VSAM file
2. Print a non-VSAM File
3. Selectively copy a non-VSAM File
· Start at a certain record, stop at a certain record
· Stop at a certain record from the beginning of the file
· Perform the previous two operations at the same time in proper succession
4. Catalog a non-VSAM File in a VSAM Catalog
5. Scratch a non-VSAM file created in a VSAM Catalog
6. Create Index for Generation Data Group
The following is the sample of a JCL statement to execute this utility program.
//TSGBIDC1 JOB ($$$$$$,11,999,A,I59604,$$$$$$$$$$,9999,9999,SYSOUT),
// 'TSGBAXC - WEST',MSGCLASS=X,REGION=64M,CLASS=A,
// NOTIFY=TSGBAXC
//PRTLOG OUTPUT CLASS=*
//*********************************************************************
//* THIS STEP COPIES THE INPUT FILE TO THE OUTPUT FILE.
//* REPRO MEANS REPRODUCE THE FILE, WHICH IS REALLY A COPY.
//STEP0001 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INPUT DD DSN=TSGBKXR.KANNAN.SOURCE,DISP=SHR
//OUTPUT DD DSN=TSGBAXC.BRANDNEW.SOURCE,DISP=SHR
//SYSIN DD *
REPRO INFILE(INPUT) OUTFILE(OUTPUT)
//*********************************************************************
//* THIS STEP COPIES THE INPUT FILE TO THE OUTPUT FILE.
//* REPRO MEANS REPORDUCE THE FILE, WHICH IS REALLY A COPY
//* STARTAT(1000) MEANS START COPYING FROM RECORD NUMBER 1000,
//* STOPAT(9000) MEANS STOP AT RECORD NUMBER 9000
//*********************************************************************
//STEP0002 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INPUT DD DSN=TSGBKXR.KANNAN.SOURCE,DISP=SHR
//OUTPUT DD DSN=TSGBAXC.BRANDNEW.SOURCE,DISP=SHR
//SYSIN DD *
REPRO INFILE(INPUT) OUTFILE(OUTPUT) -
STARTAT(1000) STOPAT(9000)
//*********************************************************************
//* THIS STEP COPIES THE INPUT FILE TO THE OUTPUT FILE. REPRO
//* MEANS REPORDUCE THE FILE, WHICH IS REALLY A COPY
//* STOPAT(9000) MEANS IT WILL COPY FROM RECORD NUMBER 0001 AND
//* STOPAT(9000).
//*********************************************************************
//STEP0003 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INPUT DD DSN=TSGBKXR.KANNAN.SOURCE,DISP=SHR
//OUTPUT DD DSN=TSGBAXC.BRANDNEW.SOURCE,DISP=SHR
//SYSIN DD *
REPRO INFILE(INPUT) OUTFILE(OUTPUT) -
STOPAT(9000)
//*********************************************************************************
//* THIS STEP CREATES INDEX FOR THE GDG OR IN OTHER WORDS, IT CREATES
//* A GDG BASE WHICH WILL BE POPULATED WHEN THE ACTUAL DATA IS BEING
//* BUILT.
//*********************************************************************************
//STEP0004 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
GDG(TSGBAXC.CUMULATIVE.SALES.DATA) -
ENTRIES(12) -
NOSCRATCH –
NOEMPTY
//******************************************************************************
//* THIS STEP DELETES AN OLD CLUSTER
//******************************************************************************
//STEP0005 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE(TSGBAXC.CUMULATIVE.SALES.DATA) -
CLUSTER
DELETE(TSGBAXC.CUMULATIVE.SALES.DATA) -
SCRATCH
//******************************************************************************
//* THIS STEP DEFINES A NEW CLUSTER
//******************************************************************************
//STEP0006 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE CLUSTER –
NAME(TSGBAXC.CUMULATIVE.SALES.DATA) –
FILE(VSAMC1) -
VOLUMES(TVA11234) –
RECORDS(100 30) –
RECORDSIZE(2000 2000) –
UNIQUE -
CISIZE(1024) -
INDEXED –
KEYS(5 12) –
DATA –
NAME(TSGBAXC.CUMULATIVE.SALES.DATA) –
INDEX –
NAME(TSGBAXC.CUMULATIVE.SALES.INDEX)
NAME - The name assigned to the cluster itself or data component, or index
Component
FILE - Specifies the ddname of a DD statement that defines the volume
that will contain the data space
VOLUMES - The Volume Serial Number that will contain the cluster
RECORDS - The space allocation for the cluster. RECORDS, TRACKS, or
CYLINDERS specifies the unit of allocation. The first operand
within the parenthesis specifies the primary allocation and the
second operand specifies the secondary allocation, just as we do in
regular new data representation
RECORDSIZE - The average and the maximum record size
UNIQUE - Specifies that a data space needs to be created for this cluster
CISIZE - The unit of direct-access storage that VSAM transfers between disk
storage and virtual storage when an I-O request is made, is called a
CONTROL INTERVAL. It should always be a multiple of 512K
INDEXED - The file organization is key-sequenced
KEYS - The length and offset of the record key
DATA NAME - Specifies the actual VSAM dataset name
INDEX NAME - Specifies the index name about where the data can be found just like the
beginning of a book, where it says, which chapter can be found in what page.
MODEL - Specifies the name of a particular cluster from where the missing parameters
need to be copied, such as MODEL(TSGBAXC.EASTERN.SALES.DATA)