Introduction


  • IEBCOPY is a data set utility used to copy or merge members between one or more PDS or PDSEs. The copying can be full or partial.
  • IEBCOPY is used to create a PDS backup and copy members from the backup into a PDS.
  • IEBCOPY automatically lists the number of unused directory blocks.
  • IEBCOPY lists the number of unused tracks available for members if the output data set is a PDS.
  • IEBCOPY input for copy operation can be a PDS, a PDSE, or unload data set that contains members to be copied, merged, altered, reblocked, loaded, or unloaded.
  • IEBCOPY output for copy operation can be an Output data set. The output data set is either a new or old data set.

Syntax -


----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
//Job-Card
//*
//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
/*
  • SYSPRINT - This is an optional DD statement. Utility programs use it for their output.
  • SYSOUT - This is an optional DD statement. SYSOUT specifies a system-defined DD name for file status codes, system abend codes information, and the display statement output.
  • SYSDUMP - This is an optional DD statement. The system uses it for dumping when an abend occurs.
  • SYSUT01/any-ddname - This is an input DD statement and is mandatory. Multiple DD statements can be provided as input.
  • SYSUT02/any-ddname - This is an output DD statement and is mandatory.
  • SYSUT03/SYSUT04 - These are buffer memory DD statements for processing the task. These are optional.
  • SYSIN - Contains the control statements for processing the task.

Control Statements -


IEBCOPY has the below control statements –

Tasks -


IEBCOPY to perform the following tasks –

Return Codes -


  • IEBCOPY returns a code in register 15 to specify the results of utility execution status.
  • The return codes of IEBCOPY and the 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.