Saturday, 10 August 2013

IEBCOPY | JCL IEBCOPY Utility | IEBCOPY Examples | IEBCOPY Delete.

IBM IEBCOPY Example
IBM IEBCOPY Utility.

In today's tutorial we will be discussing about an important mainframe utility. This utility is use to perform various operation like IEBCOPY DELETE, IEBCOPY COPY personal data set, PDSE. So, let's start with the tutorial. 

What is an IEBCOPY Utility?

The IEBCOPY utility is use to copy a partitioned data set, merge two or more partitioned data sets, archive a PDS to a sequential file in a special unloaded format, reload an unloaded PDS, or compress a PDS to reclaim unused space within the PDS.
The operation is determine by the types of input and output data sets that are specify by the input parameters.

List of operations performed by IBM IEBCOPY utility.

  • Copies a partitioned data set and to direct access volumes. Often used to expand the space allocation or change the directory space.
  • Copies a partitioned data set, converting it to a sequential data set. Used to save a partitioned data set on tape or create a backup copy.
  • Copies an unloaded partitioned data set to a direct-access volume.Used to restore a partitioned data set from tape.
  • Compress a PDS partitioned data set by copying it in place to reclaim the space occupied by deleted member.
  • Convert a PDS TO A PDSE OR BACK. To do this, just code DSNTYPE=LIBRARY on the DD statement for the PDSE and DSNTYPE=PDS on the DD statement for the PDS. 

IEBCOPY utility to work with partitioned data sets.


When you use this utility, you code the COPY control statement to identify the input and output data sets that are use. Also, you can use either SELECT or EXCLUDE statements to include or exclude members of a PDS while performing the  function.

The utility decides which of its five functions to do based on the types of the input and output data sets. For example, the input data set is a partitioned data set and the output data set is a new partitioned data set, the utility copies the original data set. 

But if the input is one or more partitioned data sets and the output is an existing partitioned data set, the utility merges the members in the input data sets with the members in the output data set. 

IEBCOPY Utility COPY Control Statement.

 COPY OUTDD=ddname,INDD=ddname[,ddname…] 

Parameter explanation. 

OUTDD | ddname of the data set to be created.
INDD  | ddnames of one or more input files.

IEBCOPY Utility SELECT and EXCLUDE control statements.

SELECT  MEMBER=member[,member…]

EXCLUDE MEMBER=member[,member…]

Parameter explanation.

MEMBER |Specifies the names of one or more members 
       |to be included or excluded.

Important point: Select and exclude are mutually exclusive. Place any select or exclude statement immediately after the copy statement. There can be several SELECT or EXCLUDE statements.

Example 1: IEBCOPY Utility example to Merges two partitioned data sets.

//RCTX013  JOB ...(JOB CARD)
//STEP01   EXEC PGM=IEBCOPY
//SYSPRINT DD   SYSOUT=*
//DDIN     DD   DSN=RC01.CPYLBXY.COB,DISP=OLD
//DDOUT    DD   DSN=RC01.PRJ.COPYLIB.COB,DISP=OLD
//SYSUT3   DD   UNIT=SYSDA,SPACE=(TRK,(10,1))
//SYSUT4   DD   UNIT=SYSDA,SPACE=(TRK,(10,1))
//SYSIN    DD   *
 COPY OUTDD=DDOUT,INDD=DDIN
/*


Example 2: IEBCOPY Utility example to Compresses a partitioned data set 

//RCTX014  JOB ...(JOB CARD)
//STEP02   EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//COMPFILE DD DSN=RC01.COPYLIB.COB,DISP=OLD
//SYSUT3   DD UNIT=SYSDA,SPACE=(TRK,(1,10))
//SYSUT4   DD UNIT=SYSDA,SPACE=(TRK,(1,10))
//SYSIN    DD *
 COPY OUTDD=COMPFILE,INDD=COMPFILE
/*


Example 2: IEBCOPY Utility example to Copy Selected PDS Members.  

//RCTX014  JOB ...(JOB CARD)
//STEP01   EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//DDIN     DD DISP=SHR,DSN=RC01.PRJ.PGM,DSNTYPE=PDS
//DDOUT    DD DISP=(NEW,CATLG,DEL),DSN=RC01.PRJ.PGM,
//            LIKE=RC01.PRJ.PGM,
              DSNTYPE=PDS
//SYSIN    DD *
  COPYGROUP INDD=DDIN,
            OUTDD=DDOUT
            SELECT MEMBER=(MEMPAY01)
            SELECT MEMBER=(MEMPAY03)
/*

Have a look of IEBGENER Utility Tutorial with examples. 

Created with Artisteer

No comments:

Post a comment