View previous topic :: View next topic
|
Author |
Message |
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
I defined a gdg base and a generation file 'G0001V00'.
When I deleted gdg base using parameter 'RECOVERY',
DELETE XX.GDG1.BASE GDG RECOVERY
the generation files become not cataloged.
I redifined the gdg base and a generation file.
The newest generation file's name is 'G0001V00' and cataloged.
The file and the foregoing file is same name,but the former file is not cataloged and the latter is cataloged.
I can't delete the generation file using command 'DELETE' or JCL.
How I can delete the generation file? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
How I can delete the generation file? |
Name the dsn in a DD statement and specify DISP=(OLD,DELETE). |
|
Back to top |
|
|
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
Your method can delete the new 'G0001V00' generation file which is cataloged,but can not delete the old 'G0001V00' one which is not cataloged.
I find a JCL deleting the uncataloged generation file.As follow:
//STEP1 EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//DD1 DD VOL=SER=XXXXXX,UNIT=SYSDA,DISP=OLD
//SYSIN DD *
DELETE YOURTSOID.DATA.GDG1.G0001V00 -
FILE(DD1) -
NVR
/*
The file name must be a real name,but not a general name.(eg. YOURTSOID.DATA.GDG1.*) |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Your method can delete the new 'G0001V00' generation file which is cataloged,but can not delete the old 'G0001V00' one which is not cataloged |
Yes, it can. All you have to do is specify the volser on the dd statement i mentioned. |
|
Back to top |
|
|
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
And you know how to delete gdg base and generation files by one statment? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
And you know how to delete gdg base and generation files by one statment? |
I'm not aware of a way to do this with one statement. |
|
Back to top |
|
|
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
I can do it with two statement.
DELETE TSOID.DATA.GDG1.*
DELETE TSOID.DATA.GDG1 GDG PURGE
Thanks a lot! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
And I can do it in ONE using the FORCE parameter |
|
Back to top |
|
|
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
Yes,I done success.
Thanks a lot. |
|
Back to top |
|
|
|