View previous topic :: View next topic |
Author |
Message |
gore Beginner
Joined: 10 Dec 2002 Posts: 46 Topics: 20 Location: Providence, RI
|
Posted: Wed Dec 11, 2002 11:57 pm Post subject: How to delete all versions of a GDG? |
|
|
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?
_________________ Gore |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Dec 12, 2002 12:20 am Post subject: |
|
|
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 |
|
|
Sreejith Intermediate
Joined: 02 Dec 2002 Posts: 155 Topics: 25 Location: N.Ireland
|
Posted: Thu Dec 12, 2002 4:46 am Post subject: |
|
|
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 |
|
|
|
|