PURGE refers to forceful removal operations in mainframe environments, most notably in IDCAMS (DELETE ... PURGE) and JES spool management. It bypasses protections like retention to immediately delete data or output. Use with caution.
Think of a shredder with a "bypass lock" key. Normally you cannot shred documents on hold. Using the bypass key (PURGE) ignores the hold and destroys them immediately. Powerful—and risky.
IDCAMS is the VSAM management utility. The PURGE option forces deletion even if a retention period is active.
123456//DELVSAM JOB ACCT,'DELETE VSAM',CLASS=A,MSGCLASS=X //IDCAMS EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE PROD.CUST.KSDS CLUSTER PURGE /*
The PURGE option overrides retention. Confirm approvals and backups before use.
Operators or automation may purge completed jobs or outputs from the JES2/JES3 spool to free space. SDSF and policies govern when and what to purge.
Mistake | Problem | Fix |
---|---|---|
Using PURGE casually | Irreversible data loss | Use approvals; prefer normal delete windows |
Ignoring retention | Compliance violation | Check governance before delete |
Skipping backup | Cannot restore if needed | Take/verify backups first |
Context | Syntax | Example |
---|---|---|
IDCAMS delete | DELETE name CLUSTER PURGE [ERASE] | DELETE PROD.KSDS CLUSTER PURGE ERASE |
Spool purge | SDSF/automation per policy | Purge outputs older than N days |
1. What does PURGE do in IDCAMS DELETE?
2. Which statement best describes JES purge?
3. Why is PURGE considered dangerous?
4. Where will you most commonly see PURGE?
5. What should you do before using PURGE?