Introduction


  • IEBCOPY is a dataset utility used to copy or merge members between one or more PDS or PDSEs. The copying can be full or partial.
  • IEBCOPY creates a PDS backup and copies 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 of the output PDS.
  • IEBCOPY input or output for COPY operation can be a PDS, a PDSE, or an unloaded PS that contains members to be copied, merged, altered, reblocked, loaded, or unloaded.
  • IEBCOPY output for COPY operation is either a new or old dataset.

Syntax -


----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
//JOBCARD
//*
//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 - Optional and uses for system output messages.
  • SYSOUT - Optional. System-defined DDname for file status codes, system abend codes information, and the display statement output.
  • SYSDUMP - Optional. System uses it for dumping when an abend occurs.
  • SYSUT01/any-ddname - This is an input DDname and is mandatory. Multiple DD statements can be provided as input.
  • SYSUT02/any-ddname - This is an output DDname and is mandatory.
  • SYSUT03/SYSUT04 - Optional. These are buffer memory DD statements for processing the task.
  • SYSIN - Contains the control statements needed for IEBCOPY utility.

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.