View previous topic :: View next topic
|
Author |
Message |
akashs
New User
Joined: 24 Nov 2005 Posts: 49 Location: chennai
|
|
|
|
In a gdg i have 50 generations..i need to delete the last 30 generations .is it possible
regards,
akash |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
AFAIK, you have to delete them one by one. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
you have to delete them one by one.
|
unless your DSN is in the form for gen number instead of relative |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Or use IDCAMS ALTER to reduce the LIMIT and do it in one quick batch job. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Of course, in the amount of time it took the OP to type the question, and then wait for a response, they could've created a list of all the generations, edited it to add the DELETE command in front, and than ran an IDCAMS or TSO job using that data. Would've been all done in about a minute. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
a simple D line command on a 3.4 would have done it, also. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Probably I misunderstood the request, may be some one can help me to understand.
OP says:
Quote: |
i need to delete the last 30 generations. |
(emphasis added by me) I believe by "last 30" he means . . .starting from 50th, 49th . . .up to 21st generations and if IDCAMS ALTER is used that will "delete" 1st, 2nd . . . up to 30th generations, right? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Anuj D. wrote: |
Probably I misunderstood the request, may be some one can help me to understand.
OP says:
Quote: |
i need to delete the last 30 generations. |
(emphasis added by me) I believe by "last 30" he means . . .starting from 50th, 49th . . .up to 21st generations and if IDCAMS ALTER is used that will "delete" 1st, 2nd . . . up to 30th generations, right? |
Using ALTER to change the LIMIT will change the number of generations retained in the GDG base. By default the oldest generations will be dropped from the base, thus retaining the latest nn generations.
I read the req as dropping the 30 oldest, but if you are correct, then the OP should have made this abundantly clear. |
|
Back to top |
|
|
|