Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
want to clear all the versions in a GDG

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
anu_kannu

New User


Joined: 20 Sep 2005
Posts: 6

PostPosted: Tue Sep 20, 2005 11:20 am    Post subject: want to clear all the versions in a GDG
Reply with quote

Hi all,
Im new to the forum.. I have a query..

How could I clear the data from all the versions of a GDG?

please help
Back to top
View user's profile Send private message

Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Tue Sep 20, 2005 12:03 pm    Post subject: Re: want to clear all the versions in a GDG
Reply with quote

In a Generation Data Group (GDG), there is the GENERATION:

HLQ.MY.GDG.G0001V00

and there is the VERSION:

HLQ.MY.GDG.G0001V00

What exactly do you mean by "Clear all the Versions"?

To clear all the Generations, a simple DISP=(OLD,DELETE) or (MOD,DELETE) allocation is all that is required:
Code:

//DEL     EXEC PGM=IEFBR14
//DD1     DD DSN=HLQ.MY.GDG,DISP=(MOD,DELETE,DELETE),...
Back to top
View user's profile Send private message
anu_kannu

New User


Joined: 20 Sep 2005
Posts: 6

PostPosted: Tue Sep 20, 2005 12:09 pm    Post subject:
Reply with quote

Hi Kevin,

I want to make all the generations (files) empty, rather than delete.

HLQ.MY.GDG.G0001V00
HLQ.MY.GDG.G0002V00
Back to top
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Tue Sep 20, 2005 12:37 pm    Post subject: Re: want to clear all the versions in a GDG
Reply with quote

To empty a dataset, you can use this logic:

Code:

//STEP0001 EXEC PGM=SORT                                 
//SORTIN   DD   DISP=SHR,DSN=HLQ.MY.GDG.G0001V00
//SORTOUT  DD   DISP=SHR,DSN=HLQ.MY.GDG.G0001V00
//SYSOUT   DD   SYSOUT=*                                 
//SYSIN    DD   *                                         
  OPTION COPY                                             
  OMIT COND=ALL                                           
//*


However, there is no special trick to make this work in just one step for all of the generations. This step would have to be repeated, either manually or programatically, for every generation as needed.
Back to top
View user's profile Send private message
anu_kannu

New User


Joined: 20 Sep 2005
Posts: 6

PostPosted: Tue Sep 20, 2005 1:12 pm    Post subject:
Reply with quote

Thanks Kevin
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Clear all TSQs during CICS sta... Hooman24 CICS 10 Mon Jun 26, 2017 9:46 pm
No new posts How to check if any of the GDG versio... ovreddy JCL & VSAM 3 Fri Jun 12, 2015 1:28 am
No new posts Related to GDG versions creations David Robinson JCL & VSAM 5 Tue Jan 20, 2015 11:14 am
No new posts GDG versions not being selected for b... Randy Wood SYNCSORT 2 Wed Aug 27, 2014 10:24 pm
No new posts Multiple GDG versions to a single fil... ouintonfloury JCL & VSAM 8 Fri Sep 13, 2013 8:45 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us