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

Delete partcular GDG version


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

New User


Joined: 19 Mar 2006
Posts: 9
Location: Bangalore, INDIA

PostPosted: Sat Apr 15, 2006 2:59 pm
Reply with quote

Hi,
Please tell me how i delete the particular GDG version.
Back to top
View user's profile Send private message
iknow

Active User


Joined: 22 Aug 2005
Posts: 411
Location: Colarado, US

PostPosted: Sat Apr 15, 2006 5:12 pm
Reply with quote

Hi,

Try this code.

Code:
//GDGDEL  JOB  (SMK),'GDG DELETE'
//STEP1  EXEC PGM=IEFBR14
//DEL1   DD   DSN=MYLIB.LIB.TEST(0)    <-- Current Version
//            DISP=(OLD,DELETE,DELETE)
//


The above example is for deleting current version. If you want to delete the particular version specify that version directly.
Back to top
View user's profile Send private message
iknow

Active User


Joined: 22 Aug 2005
Posts: 411
Location: Colarado, US

PostPosted: Sat Apr 15, 2006 5:22 pm
Reply with quote

Hi,

Please make use of this code to delete the particular generation.

To delete GDG index/generations , We need to use DELETE command in
IDCAMS utility.

There are two sub parameters we can use with DELETE command.
1)PURGE
PURGE sub parameter is used in conjunction with DELETE statement to
delete the GDG index, even if its retention period has not expired.

2)FORCE parameter can be coded on the DELETE statement to delete the
GDG index, the model, and all related generation data sets, if they
exist.


Code:
//GDGDEL  JOB  (SMK),'GDGDEL'
//STEP1  EXEC PGM=IDCAMS
//SYSIN  DD   *
    DELETE(MYLIB.LIB.TEST.G00V01) GDG FORCE
/*


The above example will delete the version 01.

Please let me know if you have any questions.
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Mon Apr 17, 2006 4:30 pm
Reply with quote

as the previous person was saying, if u want to delete there arev many ways of doing it.

1). purge will be deleting the file from the catalog but it will deleted form the database.
2). force will delete things from the database .
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 DELETE SPUFI DB2 1
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
Search our Forums:

Back to Top