Introduction
IEBCOPY is a utility in the IBM mainframe environment that is used for copying, merging, and managing datasets. The copying can be full or partial. It creates a PDS backup and copies the members back from the backup into a PDS.
It automatically lists the number of unused directory blocks. Also, it lists the number of unused tracks available for members of the output PDS.
IEBCOPY input or output for COPY operation can be a PDS, a PDSE, or an unloaded PS that contains members. IEBCOPY output for COPY operation is either a new or old dataset.
Syntax -
----+----1----+----2----+----3----+----4----+----5----+
//Jobcard-parameters
//*
//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//SYSUT1 DD DSN=...
//SYSUT2 DD DSN=...
//SYSUT3 DD UNIT=..
//SYSUT4 DD UNIT=..
//SYSIN DD *
control-statements
/*
IEBCOPY processes the tasks using job and utility control statements. Those are -
- Job Control Statements
- Utility Control Statements
Job Control Statements
- SYSPRINT - Optional. It uses for system output messages.
- SYSUT01 | any-ddname - Mandatory. This is an input PDS or unloaded PS file. Multiple DD statements can be coded as input.
- SYSUT02 | any-ddname - Mandatory. This is an output PDS or unloads the dataset for output.
- SYSUT03 | SYSUT04 - Optional. These are temporary datasets used to provide the additional memory for processing the task.
- SYSOUT - Optional. System-defined DDname used for displaying output information related to the job.
- SYSDUMP - Optional. System uses it for dumping when an abend occurs.
- SYSIN - Contains the control statements that are required for IEBCOPY utility.
Performing Tasks -
IEBCOPY to perform the following tasks –
- Copying member from one PDS to other
- Copying Members have Alias Names (COPY Statement) from PDS to other
- Merge Partitioned Data Sets
- Select specific members of a PDS or PDSE to be copied, loaded, or unloaded
- Exclude members from a PDS to be copied, unloaded, or loaded.
- Compressing a PDS
- Convert a PDS to a PDSE
- Convert a PDSE to a PDS
- Altering a load module for faster loading by MVS program fetch.
- Copying and Reblocking Load Modules
- Unloading PDS to PS
- Loading PS to create PDS
- Replace members of a PDS or PDSE
- Rename members of a PDS or PDSE
- Copying from PDS from Disk to Tape and vice versa.
Utility Control Statements
IEBCOPY utility control statements are used to control the utility processing and those are -
Return Codes -
IEBCOPY returns a code in register 15 to specify the results of the utility execution status. The return codes of IEBCOPY and their meanings are -
Codes | Meaning |
---|---|
00 (X'00') | Successful completion. |
04 (X'04') | One or more COPY or COPYGRP operations completed unsuccessfully or uncompleted. Recovery may be possible for this case. |
08 (X'08') | An unrecoverable error exists. The utility ends. |