Page 1 of 1

delete all gdg versions without deleting base.

Posted: Mon Nov 20, 2017 2:25 pm
by Ashish Mathew
Hi,

how can we delete all the GDG versions of a GDGbase with out really deleting the base. Can you please tell me?

Re: delete all gdg versions without deleting base.

Posted: Mon Nov 20, 2017 2:37 pm
by enrico-sorichetti
open the IDCAMS manual and look Yourself
https://www.ibm.com/support/knowledgece ... 00/toc.htm

Re: delete all gdg versions without deleting base.

Posted: Mon Nov 20, 2017 2:53 pm
by Anuj Dhawan
DELETE ALL GDG VERSIONS WITHOUT DELETING BASE.
Please don't use all CAPS. It's considered as shouting.

To your question - there are two way I can think of at the moment. One with IDCAMS, Enrico has already directed you to. Second is using IEFBR14 - sample Job is shown below:

Code: Select all

//JOBName
//STEP01 EXEC PGM=IEFBR14
//GDGBASE DD DSN=GDG.BASE.TO.DELETE,
//     DISP=(OLD,DELETE,DELETE)
//*

Re: delete all gdg versions without deleting base.

Posted: Mon Nov 20, 2017 3:59 pm
by nicc
Actually thse will delete generations - not necessarily versions of a generation. Which does the user want?

Re: delete all gdg versions without deleting base.

Posted: Mon Nov 20, 2017 5:56 pm
by Robert Sample
Since a GDG usually creates GENERATIONS with a VERSION of 00, but you can manually create GENERATIONS with a VERSION that is not zero, it is not all clear what you are asking. If you mixed up the terms, you need to go back and study -- for several hours at least -- the differences between GENERATIONS and VERSIONS for a GDG.

Re: delete all gdg versions without deleting base.

Posted: Tue Jan 09, 2018 3:32 pm
by Ashish Mathew
nicc wrote: Mon Nov 20, 2017 3:59 pmActually thse will delete generations - not necessarily versions of a generation. Which does the user want?
I did not get you? I needed to delete all the version for a GDG base.

Re: delete all gdg versions without deleting base.

Posted: Tue Jan 09, 2018 6:23 pm
by Robert Sample
I did not get you? I needed to delete all the version for a GDG base.
A GDG has BOTH generations and versions; you are not making it clear whether you are wanting to delete all generations of the GDG or if you have a non-zero version of a generation that you want to delete.

As long as you have confused your terminology, nobody on this -- or any -- forum can provide you any more help. Why don't you go back to the beginning, describe the data you have (with examples) and tell us what you want to do with what you have?

Re: delete all gdg versions without deleting base.

Posted: Wed Jan 10, 2018 11:21 am
by Anuj Dhawan
Ashish Mathew wrote: Tue Jan 09, 2018 3:32 pmI did not get you? I needed to delete all the version for a GDG base.
This should be of interest: viewtopic.php?f=63&t=407

Re: delete all gdg versions without deleting base.

Posted: Thu Feb 15, 2018 2:02 pm
by Ashish Mathew
So, generation is the correct word when we are referring to a gdg?

Re: delete all gdg versions without deleting base.

Posted: Thu Feb 15, 2018 4:27 pm
by nicc
What was not clear? The first sentence clearly give you the information that you are querying.

I suggest that you start reading: google this: "z/OS Basic Skills"

Re: delete all gdg versions without deleting base.

Posted: Thu Feb 15, 2018 6:15 pm
by Robert Sample
So, generation is the correct word when we are referring to a gdg?
In the vast majority of cases, yes. There are some sites that create V01 (or V02 or ...) -- that is, different versions of a single generation -- so there are cases when referring to version is valid. These cases are very rare -- I think I've dealt with 2 or 3 in 40+ years of mainframe processing.

Re: delete all gdg versions without deleting base.

Posted: Tue Feb 20, 2018 6:44 pm
by Ashish Mathew
Thanks. I was talking about generation not versions.

Re: delete all gdg versions without deleting base.

Posted: Tue Feb 20, 2018 7:54 pm
by Anuj Dhawan
Thanks for the confirmation - hope you now understand the difference. :)

Re: delete all gdg versions without deleting base.

Posted: Sat Apr 14, 2018 6:05 pm
by Ashish Mathew
Yes I understand it now.