Can we delete all versions of a GDG and just keep base.
-
- Registered Member
- Posts: 16
- Joined: Sun Oct 20, 2013 2:04 pm
Can we delete all versions of a GDG and just keep base.
Hi,
Can someone please advise me if we can delete all versions of a GDG and just keep base of it. I tried to delete them using ISPF 3.4, locating and deleting them one by one for test. But is there a way to do it using some program or utility? Please advise.
Can someone please advise me if we can delete all versions of a GDG and just keep base of it. I tried to delete them using ISPF 3.4, locating and deleting them one by one for test. But is there a way to do it using some program or utility? Please advise.
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Can we delete all versions of a GDG and just keep base.
We used to delete the gig base. That deleted all versions. We then redefined the gig base. This was the most straightforward method for our process.
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Can we delete all versions of a GDG and just keep base.
Use IDCAMS command which will remove all the generations while leaving the GDG base cataloged. In many applications, this will be better than deleting the base name and redefining it.
Code: Select all
DELETE GDG.BASE.NAME.*
-
- Registered Member
- Posts: 16
- Joined: Sun Oct 20, 2013 2:04 pm
Re: Can we delete all versions of a GDG and just keep base.
Hi Robert,
I hve used the following:
But it gave me RC=8. Then I tried:
It deleted all versions of it. Which one is better?
I hve used the following:
Code: Select all
//PGM EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE (YOUR.INPUT.GDG) GDG
Code: Select all
//PGM EXEC PGM=IEFBR14
//GDGB DD DSN=YOUR.INPUT.GDG,
// DISP=(OLD,DELETE,DELETE)
-
- Registered Member
- Posts: 16
- Joined: Sun Oct 20, 2013 2:04 pm
Re: Can we delete all versions of a GDG and just keep base.
How have you managed to copy the GDG base with same properties again?
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Can we delete all versions of a GDG and just keep base.
If YOUR.INPUT.GDG has generations, I would expect the return code to be 8. The process you should use isI hve used the following:
CODE: SELECT ALL
//PGM EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE (YOUR.INPUT.GDG) GDG
But it gave me RC=8.
Code: Select all
//PGM EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE YOUR.INPUT.GDG.*
DELETE YOUR.INPUT.GDG GDG
Many sites have standard jobs to define their GDGs.How have you managed to copy the GDG base with same properties again?
-
- Registered Member
- Posts: 16
- Joined: Sun Oct 20, 2013 2:04 pm
Re: Can we delete all versions of a GDG and just keep base.
Thank you.
With this
With this
I was asking why would we delete a GDG base and then again recreate it? We should just keep the base intact when we require it again.Many sites have standard jobs to define their GDGs.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute