Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to create a third index for the GDG

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

New User


Joined: 10 Jun 2007
Posts: 36
Location: Chennai

PostPosted: Sun Jul 29, 2007 1:05 pm    Post subject: How to create a third index for the GDG
Reply with quote

Hi,

Suppose i have 2 existing GDG versions say 1 and 2 , now i need third one(i want to create it) so, what should be it's index ?

and after i create third one , i want a fourth one same as the third one , i.e, i want to take input from third one for the fourth , so in this case what will be the index of fourth ?


Regards,
anu.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sun Jul 29, 2007 1:14 pm    Post subject:
Reply with quote

Why not try it yourself and post the results here.
Back to top
View user's profile Send private message
helga

New User


Joined: 11 Sep 2006
Posts: 23

PostPosted: Tue Jul 31, 2007 12:58 am    Post subject: Re: How to create a third index for the GDG
Reply with quote

That's the problem with GDGs and why I never use them.

The first time you submit the job, you'll use .G0001V00 and .G0002V00 and then the next time you'll use .G0002V00 and .G0003V00 etc


Not only is it extremely tedious, especially if you have to migrate the JCL to production each time, but it's only a question of time before you introduce a typo and end up merging the wrong generations of the GDG.

GDGs: good idea in theory, but almost unworkable in practice. You should avoid them too.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Jul 31, 2007 4:09 am    Post subject:
Reply with quote

icon_sad.gif No you normally only reference GDG's by a relative number, you create (+1) and if you need the previous then you reference it as (-1) but you almost never reference them by absolute generation .g0001v00. If you are using absolute generation to address them then you have serious design problems and a serious lack of knowledge.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Jul 31, 2007 6:14 am    Post subject:
Reply with quote

The only time I use the .G0002V00 is for one time reports from backups.

Otherwise we use GDG's all the time like Craq said.

Backup step ->

FILE.LOCATION -> FILE.LOCATION.BACKUP(+1)

A report that runs off the 2 most recent backups regularly

Input:
FILE.LOCATION.BACKUP(-1)
FILE.LOCATION.BACKUP(0)
Output:
Some Report
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: Tue Jul 31, 2007 6:28 am    Post subject:
Reply with quote

Hello,

Gotta go along with Craq - big time icon_smile.gif

GDGs are quite powerful for managing sequential files that have processes that read an existing "current" file and apply "transactions" to create a "new" generation. Rarely (if ever) should the fully qualified name be used in JCL. Relative number will almost always provide everything needed for production jobs. Using GDGs reduces/eliminates many setup errors and makes the job(s) much easier to understand when looking at the JCL.

Another way i use GDGs is for various backup jobs.

The other way i use GDGs often is when several sub systems create data in a common format to be used as input to a central system (this won't "just happen" - it needs planning). Suppose the General Ledger system is "fed" by many of the accounting processes. Each process creates a +1 with a common dataset name and standardly formatted data. When the G/L process is run it specifies the GDG base with nothing else (no relative number and no full qualification) and all currently cataloged generations are read as a single dataset - the concatenation is automatic.

A "normal" job that uses the fully qualified dataset names should be looked at very hard and be changed to use relative generations.
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 Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 5 Thu Apr 27, 2017 1:15 am
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us