IEBCOPY

  • IEBCOPY is used to copy, merge, and compress Partitioned Datasets (PDS) or Partitioned Dataset Extended (PDSE).

  • It is primarily used for copying members between PDS/PDSE datasets and for creating backups of partitioned datasets.

  • IEBCOPY can copy an entire PDS/PDSE, selected members, or compress a PDS by removing unused space

  • Lists the number of unused directory blocks for efficient dataset utilization.

EXAMPLE:

Copy from one PDS to another PDS

//IEBCOPY  JOB (12345),CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID
//STEP1    EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*                         
//SYSUT1   DD DSN=T12345.SOURCE.PDS,DISP=SHR     
//SYSUT2   DD DSN=T12345.TARGET.PDS,DISP=SHR     
//SYSIN    DD *                                  
 COPY INDD=SYSUT1,
 OUTDD=SYSUT2                  
/*

Explanation:

EXEC Statement: Executes the IEBCOPY utility to copy members.

DD Statement:

  • SYSUT1 DD: Specifies the input PDS (T12345.SOURCE.PDS) that contains the members to be copied.

  • SYSUT2 DD: Specifies the output PDS (T12345.TARGET.PDS) where the members will be copied to.

  • SYSPRINT DD: Sends the copy operation log and messages to SYSOUT.

  • SYSIN DD: Contains control statements. COPY INDD=SYSUT1,OUTDD=SYSUT2, tells IEBCOPY to copy all members from the input PDS to the output PDS

This IEBCOPY JCL program copies all members from one Partitioned Dataset (PDS) (T12345.SOURCE.PDS) to another PDS (T12345.TARGET.PDS).

Last updated

Was this helpful?