Here I would like to share some knowledge about this topic, and hope someone could benefit from this post.
The directory block of this dataset was full and compressing it won't help, and I reallocated the dataset with larger primary space and directory space.
It's possible to compress a PDS while someone is using it. the trick is DISP=SHR, and not using ISPF to do the compress. Here is sample JCL:
- Code: Select all
//...your job card here.
//COMPRESS PROC DSN=''
//COMPSTEP EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=&DSN
//SYSUT2 DD DISP=SHR,DSN=&DSN
// PEND
//COMP001 EXEC COMPRESS,DSN=CICSTS23.CICS.SDFHLOAD
This CICS dataset is in LNKLST and used by CICS. After compression, it's better to restart CICS and refresh LINKLST.
To reallocate this dataset, we did following steps:
1. Pre-allocate a new dataset with disired primary/secondary space, directory space, volume location, etc. For example CICSTS23.CICS.SDFHLOAD.NEW.
2. Copy all modules from old LOADLIB to the new one.
3. Stop CICS.
4. Remove the dataset from the LINKLST.
5. At this time, no one allocates the old dataset. Rename the old dataset to CICSTS23.CICS.SDFHLOAD.OLD
6. Rename CICSTS23.CICS.SDFHLOAD.NEW to CICSTS23.CICS.SDFHLOAD
7. Add the dataset back to LINKLST.
8. Start CICS.