Page 1 of 1
Delete all the generations in GDG.
Posted: Mon Oct 13, 2014 3:47 pm
by Sanjana Kashyap
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.
Re: Delete all the generations in GDG.
Posted: Mon Oct 13, 2014 5:54 pm
by Robert Sample
IDCAMS
Re: Delete all the generations in GDG.
Posted: Mon Oct 13, 2014 7:54 pm
by Anuj Dhawan
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?
Re: Delete all the generations in GDG.
Posted: Tue Oct 14, 2014 6:02 am
by Robert Sample
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
Re: Delete all the generations in GDG.
Posted: Tue Oct 14, 2014 8:34 am
by Anuj Dhawan
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:
Code: Select all
//STEPXXXX EXEC PGM=IEFBR14
//DELGDGS DD DSN=&ID..MY.GDG,
// DISP=(MOD,DELETE,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(1,0))
//*
Re: Delete all the generations in GDG.
Posted: Mon Dec 29, 2014 4:33 pm
by Sanjana Kashyap
Thanks guys!
There is no need to feel bad Anuj. Your solution alsohelped me.
Re: Delete all the generations in GDG.
Posted: Mon Dec 29, 2014 4:50 pm
by Anuj Dhawan
Sanjana Kashyap wrote:There is no need to feel bad Anuj.
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!