IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

About GDG generation files


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
zawx

New User


Joined: 28 Feb 2008
Posts: 21
Location: china

PostPosted: Mon Mar 17, 2008 12:32 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Mar 17, 2008 4:53 pm
Reply with quote

Hello,

Quote:
How I can delete the generation file?
Name the dsn in a DD statement and specify DISP=(OLD,DELETE).
Back to top
View user's profile Send private message
zawx

New User


Joined: 28 Feb 2008
Posts: 21
Location: china

PostPosted: Tue Mar 18, 2008 6:50 am
Reply with 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.
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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Mar 18, 2008 7:00 am
Reply with quote

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
View user's profile Send private message
zawx

New User


Joined: 28 Feb 2008
Posts: 21
Location: china

PostPosted: Tue Mar 18, 2008 7:30 am
Reply with quote

And you know how to delete gdg base and generation files by one statment?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Mar 18, 2008 7:52 am
Reply with quote

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
View user's profile Send private message
zawx

New User


Joined: 28 Feb 2008
Posts: 21
Location: china

PostPosted: Tue Mar 18, 2008 9:01 am
Reply with quote

I can do it with two statement.

DELETE TSOID.DATA.GDG1.*
DELETE TSOID.DATA.GDG1 GDG PURGE

Thanks a lot!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Mar 18, 2008 12:51 pm
Reply with quote

And I can do it in ONE using the FORCE parameter
Back to top
View user's profile Send private message
zawx

New User


Joined: 28 Feb 2008
Posts: 21
Location: china

PostPosted: Thu Mar 20, 2008 5:57 am
Reply with quote

Yes,I done success.
Thanks a lot.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top