Delete all the generations in GDG.
-
- New Member
- Posts: 5
- Joined: Wed Jul 30, 2014 10:26 am
Delete all the generations in GDG.
Hi,
I've a GDG base having 5 generations, is there any way to delete all of them in a single go using some utility in JCL? Please advise.
I've a GDG base having 5 generations, is there any way to delete all of them in a single go using some utility in JCL? Please advise.
- Robert Sample
- Global Moderator
- Posts: 1886
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
- Anuj Dhawan
- Founder
- Posts: 2799
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Delete all the generations in GDG.
Robert - I might be wrong as there is some ambiguity in the post from OP, however I think he wants to delete the generations and want to retain the base, possibly?
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
- Robert Sample
- Global Moderator
- Posts: 1886
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Delete all the generations in GDG.
IDCAMS can delete all generations of a GDG and leave the base alone. In fact, my usual JCL to get rid of a GDG does two DELETE commands -- the first gets rid of all the generations, the second gets rid of the GDG base.
Code: Select all
DEL PGMR.UPSTREAM.DOM1.BACKUP.* PURGE
DEL PGMR.UPSTREAM.DOM1.BACKUP GDG
- Anuj Dhawan
- Founder
- Posts: 2799
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Delete all the generations in GDG.
Removing the egg from face slowly...
I had this IEFBR14 thing in mind and missed on the wild-card as part of parameter to IDCAMS:
I had this IEFBR14 thing in mind and missed on the wild-card as part of parameter to IDCAMS:
Code: Select all
//STEPXXXX EXEC PGM=IEFBR14
//DELGDGS DD DSN=&ID..MY.GDG,
// DISP=(MOD,DELETE,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(1,0))
//*
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
-
- New Member
- Posts: 5
- Joined: Wed Jul 30, 2014 10:26 am
Re: Delete all the generations in GDG.
Thanks guys!
There is no need to feel bad Anuj. Your solution alsohelped me.
There is no need to feel bad Anuj. Your solution alsohelped me.
- Anuj Dhawan
- Founder
- Posts: 2799
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Delete all the generations in GDG.
Thanks for the kind words Sanjana - it was a "self-talk", actually. And I realize that I should not have done this while having the fingers on key-board!Sanjana Kashyap wrote:There is no need to feel bad Anuj.
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute