---
title: "Delete GDG cluster Sample JCL Example"
description: "JCL to delete GDG and VSAM base cluster quickly."
url: https://srinimf.com/2012/05/24/delete-jcl-for-gdg-base-and-vsam-cluster/
date: 2012-05-24
modified: 2026-10-05
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2012/05/jcl-you-need-delete-gdg.jpg?fit=1200%2C900&ssl=1
categories: ["JCL", "VSAM"]
tags: ["Delete GDG example", "JCL tips and Tricks"]
type: post
lang: en
---

# Delete GDG cluster Sample JCL Example

The below JCL you can use to delete [GDG base](https://srinimf.com/2015/12/19/jcl-gdg-required-and-optional-parameters/) cluster. The interesting point is if you delete the GDG base, automatically it deletes all the versions.

## Sample JCL

```
//Step1   EXEC  PGM=IDCAMS
//SYSIN   DD   *
 DELETE 'XXXX.XXXX.XXXX.XXX' GDG FORCE
/*
```

## Alternative JCL Example

(or) if we want to delete migrated-GDGS,  use the following syntax.

```
//Step1   EXEC  PGM=IDCAMS
//SYSIN   DD   *
 HDELETE 'XXXX.XXXX.XXXX.XXX' GDG FORCE
/*
```

**Notes: **To delete VSAM clusters, give CLUSTER in place of GDG.

## Popular Parameters you can use with DELETE.

- **FORCE:** It deletes all clusters in the catalogue.

- **NOFORCE:** It deletes an empty catalog. If the catalog does have cluster entries, it will not delete.

- **PURGE:** Even though GDG has retention period, it deletes all entries.

- **NOPURGE:** When the GDG has retention period, it will not delete the entries.

**Notes: **With [IDCAMS utility](https://srinimf.com/2017/01/07/the-top-7-idcams-commands-need-for-vsam/) we can delete GDG clusters and VSAM clusters. 

Related Posts

- [6 Ideas – How to use JCL GDG Correctly](https://srinimf.com/2015/12/25/6-precious-tips-to-help-better-understand-of-gdgs-in-jcl/)DateDecember 25, 2015
- [JCL GDG Life Cycle: Create, Model, Generate, Delete, Alter](https://srinimf.com/2016/04/22/jcl-gdg-create-delete-alter-gdgs-all-examples/)DateApril 22, 2016
- [GDG – Generation G0000V00 – Change V00 to V01](https://srinimf.com/2014/03/20/gdg-generation-version-change/)DateMarch 20, 2014

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2012%2F05%2F24%2Fdelete-jcl-for-gdg-base-and-vsam-cluster%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2012%2F05%2Fjcl-you-need-delete-gdg.jpg%3Ffit%3D1200%252C900%26ssl%3D1&description=Delete%20GDG%20cluster%20Sample%20JCL%20Example)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2012/05/24/delete-jcl-for-gdg-base-and-vsam-cluster/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2012/05/24/delete-jcl-for-gdg-base-and-vsam-cluster/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2012/05/24/delete-jcl-for-gdg-base-and-vsam-cluster/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2012/05/24/delete-jcl-for-gdg-base-and-vsam-cluster/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Delete%20GDG%20cluster%20Sample%20JCL%20Example&body=https%3A%2F%2Fsrinimf.com%2F2012%2F05%2F24%2Fdelete-jcl-for-gdg-base-and-vsam-cluster%2F&share=email)
-

### Like this:

Like Loading…
