Compressing a PDS
Compressing a PDS
IEBCOPY can be used to compress a PDS. A PDS may contain unused areas from a deleted member, or the old version of an updated member. Compressing a PDS involves removing unused or deleted members and reclaiming space within the dataset. This helps in optimizing storage usage.
Practical 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 -
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.