MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to delete all versions of a GDG?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
gore
Beginner


Joined: 10 Dec 2002
Posts: 46
Topics: 20
Location: Providence, RI

PostPosted: Wed Dec 11, 2002 11:57 pm    Post subject: How to delete all versions of a GDG? Reply with quote

How to delete all versions of a GDG?
I know two ways
1) Delete all the known members explicitly like DELETE XYZ.GDG.G101v001
2) Issue a generic delete DELETE XYZ.GDG.*, which is of course fast but risky.

Is there some other safe & reliable excluding the above mentioned 2 ways?
Question
_________________
Gore
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Dec 12, 2002 12:20 am    Post subject: Reply with quote

Gore,

You can use an IDCAMS "ALTER GDG" to reset the number of generations to 1 by specifying LIMIT(1). That will automatically delete all but the latest generation.Then delete that one remaining generation.Once again reset the LIMIT count to whatever it was to start with.

The following is a sample JCL for Alter
Code:

//STEP010  EXEC PGM=IDCAMS               
//SYSPRINT DD  SYSOUT=*                 
//SYSIN    DD  *                         
  ALTER 'GDG BASE NAME' LIMIT(1)     
/*   


Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Thu Dec 12, 2002 4:46 am    Post subject: Reply with quote

The following will delete all versions of a GDG keeping the gdg base. userid.mygdg is the gdg base name.

Code:

//STEP1  EXEC PGM=IEFBR14
//DD1    DD  DSN=userid.mygdg,DISP=(SHR,DELETE,KEEP),


Sreejith
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group