Compressing a PDS Example


Scenario - Compress a PDS.

JCL -

----+----1----+----2----+----3----+----4----+----5----+
//MATEPKC  JOB (123),'MTH',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),
//             NOTIFY=&SYSUID
//***********************************************
//* COMPRESS THE PDS
//***********************************************
//STEP10   EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSDUMP  DD SYSOUT=*
//SYSUT1   DD DSN=MATEPK.IEBCOPY.INPPDS,DISP=SHR
//SYSIN    DD *
  COPY OUTDD=SYSUT1,INDD=SYSUT1
/* 

Job Status -

Compress PDS Job Status

Explaining Example -

  • SYSUT1 DD DSN=MATEPK.IEBCOPY.INPPDS - Specifies the PDS that needs to be compressed.
  • SYSIN DD - Has the control statements for processing the input.
  • COPY OUTDD=SYSUT2,INDD=SYSUT1 - INDD, OUTDD should be same to compress it.
Note! A PDS can be destroyed if IEBCOPY is interrupted during processing. Do not compress a PDS currently being used by more than one user.