Compressing a PDS
Compressing a PDS
Summary
For basic information, go through the IEBCOPY Utility (for Beginners)
- A PDS may contain unused areas where a deleted member or the old version of an updated member exists.
- The unused space is reused when a PDS is copied to a new data set or after a compress operation completes.
- The compress operation performs by a COPY statement where both the OUTDD and INDD parameters are specified with the same DDname without the SELECT / EXCLUDE statements.
- The compress operation is performed in the same relative order as the DDnames in the INDD list.
Practical Example -
Scenario - Compress a PDS.
JCL -
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
//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
//SYSUT2 DD DSN=MATEPK.IEBCOPY.INPPDS,DISP=OLD
//SYSIN DD *
COPY OUTDD=SYSUT2,INDD=SYSUT1
/*
**************************** Bottom of Data ****************************
Job Status -

Explaining Example -
- SYSUT1 DD DSN=MATEPK.IEBCOPY.INPPDS
SYSUT2 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.