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

Batch Delete all the generations of a GDG after PGM executed


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

New User


Joined: 14 Sep 2005
Posts: 74
Location: Atlanta, (USA)

PostPosted: Tue Feb 27, 2007 2:40 am
Reply with quote

Hi,

I would like to delete all the generations for a gdg base after the execution of the program.
Please can anyone let me know how to do it in batch. I would like to retain the base for the next run.
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 Feb 27, 2007 4:23 am
Reply with quote

Hello,

Let's say you usually code your.dsn(+1) to create a new version and you code your.dsn(0) to read the most recent version. To delete all of the cataloged versions, you can use
Code:
//DD1  DD DSN=your.dsn,DISP=(OLD,DELETE,DELETE)


Do not specify the version. All cataloged versions will be uncataloged/deleted and the gdg base will still be there for the next use.
Back to top
View user's profile Send private message
prasadplease

New User


Joined: 02 Sep 2006
Posts: 31
Location: Mumbai

PostPosted: Wed Feb 28, 2007 11:58 am
Reply with quote

Use IEFBR14

//STEP001 EXEC PGM=IEFBR14
//DD1 DD DSN= gdg base name,
// DISP=OLD,DELETE)
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 RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
Search our Forums:

Back to Top