Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to delete the selective GDG generations?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
shanth555

New User


Joined: 17 Aug 2012
Posts: 35
Location: India

PostPosted: Tue Jan 29, 2013 3:57 pm    Post subject: How to delete the selective GDG generations?
Reply with quote

My GDG looks like below,

XXXX.XXXX.A(0)
XXXX.XXXX.A(1)
XXXX.XXXX.A(2)
.
.
.
.
XXXX.XXXX.A(99)

i want to delete the generations between 0-50. is there any easiest way to delete these generations.

i would be grateful for your help.

Thanks,
Shanth
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7996
Location: Bellevue, IA

PostPosted: Tue Jan 29, 2013 5:22 pm    Post subject:
Reply with quote

It is not clear what you want. Since GDG relative generations reference the latest generation first, your XXXX.XXXX.A(0) is the most recently created generation. Are you wanting to get rid of the 50 most recent generations and keep XXXX.XXXX.A(50) through XXXX.XXXX.A(99), or are you wanting to get rid of the 50 oldest generations and keep XXXX.XXXX.A(0) through XXXX.XXXX.A(49)?
Back to top
View user's profile Send private message
shanth555

New User


Joined: 17 Aug 2012
Posts: 35
Location: India

PostPosted: Tue Jan 29, 2013 6:36 pm    Post subject:
Reply with quote

Hi Robert,


I want to delete the oldest 50 generations and keep XXXX.XXXX.A(0) through XXXX.XXXX.A(49).
Back to top
View user's profile Send private message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Tue Jan 29, 2013 7:48 pm    Post subject:
Reply with quote

I'm going to assume you mis-typed your example generations [i.e. "A(1)" instead of "A(-1)] and add on pretend generation numbers for example purpose only since you do not show them, and give example GDG delete using GDG Fully Qualified Name.

Good luck.

Code:
GDG Symbolic Data Set Name   GDG Fully Qualified Name (i.e. what name looks like in TSO 3.4)
XXXX.XXXX.A(0)   current GDG  XXXX.XXXX.A.G0100V00
XXXX.XXXX.A(-1)               XXXX.XXXX.A.G0099V00
XXXX.XXXX.A(-2)               XXXX.XXXX.A.G0098V00

XXXX.XXXX.A(-50)              XXXX.XXXX.A.G0050V00
XXXX.XXXX.A(-51)              XXXX.XXXX.A.G0049V00
XXXX.XXXX.A(-52)              XXXX.XXXX.A.G0048V00

XXXX.XXXX.A(-99)              XXXX.XXXX.A.G0001V00
Code:
//STEP010  EXEC PGM=IDCAMS             
//SYSPRINT DD SYSOUT=*                 
//SYSOUD   DD SYSOUT=*                 
//SYSOUT   DD SYSOUT=* 
//*--- DELETE GDG FULLY QUALIFIED NAME(S)               
//SYSIN    DD *                       
   DELETE XXXX.XXXX.A.G0050V00   PURGE
   DELETE XXXX.XXXX.A.G0049V00   PURGE
   DELETE XXXX.XXXX.A.G0048V00   PURGE
   ...                                 
   DELETE XXXX.XXXX.A.G0001V00   PURGE
/*   
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7996
Location: Bellevue, IA

PostPosted: Tue Jan 29, 2013 8:09 pm    Post subject:
Reply with quote

If the GDG currently has a limit of 100 generations, you could alter the limit (via IDCAMS) to 50 to roll off the oldest 50 generations, then reset the limit to 100 via IDCAMS to get back to the way things are. What happens to the generations rolled off, however, depends upon how your site has the GDG set up.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts Delete record or Reset RC code using ... mpawan Compuware & Other Tools 4 Tue Jul 26, 2016 3:52 pm
No new posts Compare each GDG Generations to other... Ayyappa1 JCL & VSAM 13 Tue Jun 28, 2016 1:48 pm
No new posts Delete VSAM File Records amitc23 CICS 6 Sun Apr 10, 2016 10:10 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us