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

How to get the GDG generations


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

New User


Joined: 18 Mar 2008
Posts: 34
Location: INDIA

PostPosted: Fri Apr 17, 2009 12:58 am
Reply with quote

I have a GDG file . i want all GDG versions of that file to be merged into a single file.

But i dont know how many generations are there of tht GDG file.
How to get this???
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Apr 17, 2009 1:01 am
Reply with quote

You can use below...

Code:

//STEP0200 EXEC PGM=SORT                                         
//SORTIN   DD DSN=gdgbase,DISP=SHR     
//SORTOUT  DD DSN=flatfile,DISP=(new,catlg,delete)                 
//SYSOUT   DD SYSOUT=*                                           
//SYSIN    DD *                                                   
  SORT FIELDS=COPY
/*                                                               
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Apr 17, 2009 1:02 am
Reply with quote

Check the JCL manual (link at the top of the page) for using GDG base in your job.
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: Fri Apr 17, 2009 1:07 am
Reply with quote

Hello,

Do you really mean merged or just want all of the data combined into one file?
Back to top
View user's profile Send private message
dilpreet

New User


Joined: 18 Mar 2008
Posts: 34
Location: INDIA

PostPosted: Fri Apr 17, 2009 1:11 am
Reply with quote

just want to merge all the data in the total no. of generations into a single file. For this i should know the total no. of generations?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Apr 17, 2009 1:12 am
Reply with quote

Nope, referencing the GDG base will access all cataloged generations without requiring you to enumerate them. The order in which the data is retrieved, though, isn't from the lowest generation number to the highest so if that matters you may need a sort.

And be aware of terminology ... you said
Quote:
I have a GDG file . i want all GDG versions of that file to be merged into a single file.

But i dont know how many generations are there of tht GDG file.
and there is a BIG difference between versions and generations.
Back to top
View user's profile Send private message
dilpreet

New User


Joined: 18 Mar 2008
Posts: 34
Location: INDIA

PostPosted: Fri Apr 17, 2009 1:20 am
Reply with quote

Sorry for the mistake

But how would i get to know how many generations are there ?

Please elaborate
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: Fri Apr 17, 2009 1:31 am
Reply with quote

Hello,

You could do an IDCAMS LISTCAT.

Also, you didn't answer the "merge" question. . .
Quote:
Do you really mean merged or just want all of the data combined into one file?
Combining all of the generations into a single "stacked" file is not the same as merging them.
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 Rexx to list generations of GDGs and ... CLIST & REXX 3
No new posts Compare each GDG Generations to other... JCL & VSAM 13
No new posts Editing "member generations"... TSO/ISPF 1
No new posts Read all GDG generations, execept las... JCL & VSAM 5
No new posts Create dynamic gdg generations based ... DFSORT/ICETOOL 12
Search our Forums:

Back to Top