delete all gdg versions without deleting base.

JES2/3, JCL, utilities.
Post Reply
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

delete all gdg versions without deleting base.

Post 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?
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 821
Joined: Wed Sep 11, 2013 3:57 pm

Re: delete all gdg versions without deleting base.

Post by enrico-sorichetti »

open the IDCAMS manual and look Yourself
https://www.ibm.com/support/knowledgece ... 00/toc.htm
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: delete all gdg versions without deleting base.

Post 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)
//*
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.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: delete all gdg versions without deleting base.

Post by nicc »

Actually thse will delete generations - not necessarily versions of a generation. Which does the user want?
Regards
Nic
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1878
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: delete all gdg versions without deleting base.

Post 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.
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

Re: delete all gdg versions without deleting base.

Post 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.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1878
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: delete all gdg versions without deleting base.

Post 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?
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: delete all gdg versions without deleting base.

Post 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
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.
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

Re: delete all gdg versions without deleting base.

Post by Ashish Mathew »

So, generation is the correct word when we are referring to a gdg?
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: delete all gdg versions without deleting base.

Post 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"
Regards
Nic
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1878
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: delete all gdg versions without deleting base.

Post 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.
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

Re: delete all gdg versions without deleting base.

Post by Ashish Mathew »

Thanks. I was talking about generation not versions.
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: delete all gdg versions without deleting base.

Post by Anuj Dhawan »

Thanks for the confirmation - hope you now understand the difference. :)
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.
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

Re: delete all gdg versions without deleting base.

Post by Ashish Mathew »

Yes I understand it now.
Post Reply

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

Register

Sign in

Return to “JCL - Job Control Language.”