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
 
How to get the GDG generations

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to get the GDG generations
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    Post subject:
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: 8195
Location: East Dubuque, Illinois, USA

PostPosted: Fri Apr 17, 2009 1:02 am    Post subject:
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

Site Director


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

PostPosted: Fri Apr 17, 2009 1:07 am    Post subject:
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    Post subject:
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: 8195
Location: East Dubuque, Illinois, USA

PostPosted: Fri Apr 17, 2009 1:12 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Apr 17, 2009 1:31 am    Post subject:
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    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 Compare each GDG Generations to other... Ayyappa1 JCL & VSAM 13 Tue Jun 28, 2016 1:48 pm
No new posts Editing "member generations"... Ricardo Viegas TSO/ISPF 1 Tue Dec 29, 2015 7:27 pm
No new posts Read all GDG generations, execept las... knobi JCL & VSAM 5 Fri Dec 12, 2014 12:52 am
No new posts Create dynamic gdg generations based ... Aditya Prakash Joshi DFSORT/ICETOOL 12 Tue May 20, 2014 8:13 am
No new posts Copy all the generations of GDG1 to a... Minaxi Singh JCL & VSAM 9 Mon Oct 14, 2013 9:05 pm

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