delete all gdg versions without deleting base.

JES2/3, JCL, utilities.
Previous topicNext topic

Topic Author
Ashish Mathew
Registered Member
Posts: 41
Joined: Thu Jun 27, 2013 6:17 pm
Zodiac: Scorpio

delete all gdg versions without deleting base.

Post by Ashish Mathew » Mon Nov 20, 2017 2:25 pm

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: 881
Joined: Wed Sep 11, 2013 3:57 pm

Re: delete all gdg versions without deleting base.

Post by enrico-sorichetti » Mon Nov 20, 2017 2:37 pm

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: 2611
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Zodiac: Sagittarius

Re: delete all gdg versions without deleting base.

Post by Anuj Dhawan » Mon Nov 20, 2017 2:53 pm

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: 582
Joined: Wed Apr 23, 2014 8:45 pm

Re: delete all gdg versions without deleting base.

Post by nicc » Mon Nov 20, 2017 3:59 pm

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: 1338
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
Zodiac: Virgo

Re: delete all gdg versions without deleting base.

Post by Robert Sample » Mon Nov 20, 2017 5:56 pm

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.



Previous topicNext topic

Return to “JCL - Job Control Language.”