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

GDG generation define and reference..


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

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Sun Sep 21, 2008 7:07 am
Reply with quote

Hi,

Dick & Expat has given the best suggestion, well, for my .02 cents ..read on..

The files within a GDG are assigned names derived from the name of the base and have a generation number added to the end so as to give each file an unique name. For example if the GDG base is called PROD.XXXXXX.INPUT then the first file created within this GDG will be given the name PROD.XXXXXX.INPUT.G0001V00 and subsequent files will be named by incrementing the generation number giving filenames ending in G0002V00, G0003V00, etc. all the way to G9999V00 after which the numbering will start again from G0001V00. The two zeroes on the end of the name used to represent a volume number which is used when the file is stored on media requiring the use of multiple volumes. Since multi-volume storage is now rarely required the last two digits are now usually used for version control instead.

You can use the number on the end of the filename to create a replacement dataset within a GDG without overwriting the original file. For example if PROD.XXXXXX.INPUT.G0013V00 exists and you create PROD.XXXXXX.INPUT.G0013V01 then both files will exist with only the last one created being attached to the GDG. This is effectively the same as creating two ordinary datasets except that one of them also belongs to a GDG. Of course if you then delete and recreate PROD.XXXXXX.INPUT.G0013V00 then this will be the one belonging to the GDG (since it was the last one created) so you can't rely on the volume number to tell you which one belongs to the GDG. With a properly created multi-volume GDG (that is one created using a relative record number rather than a full name) all of the volumes belong to the GDG and the full name including the volume number is only used internally to GDG processing when creating the volumes in the first place and you only see it when you are reading the dataset back in and the system needs to ask for you to mount the next volume
Back to top
View user's profile Send private message
helga

New User


Joined: 11 Sep 2006
Posts: 23

PostPosted: Tue Oct 07, 2008 1:34 am
Reply with quote

I'd dispute this.

Either using relative generation numbers or explicit GooVoo numbers, you can only have one version of a generation a GDG - in the catalog at least.

That is to say that if you have A.B.C.G0003V00 and you explicitely create A.B.C.G0003V01, then the V00 is removed.



As for the reason for version numbers, I think it's quite simple, you might have a GDG that runs in a monthly job, so G0001 is Jan, G0002 is Feb etc, well if your Feb run abends and you rerun with (+1) then G0003 now applies to Feb. In this case, you might make G0002V01 to maintain consistency.

Likewise, knowing that (-3) is the file from three months ago might be important, but is not something you can rely on if when you restart jobs, you use (+1). Restarting with icremented version umbers and not generation numbers would avoind this problem.



What I'd like to know, and I'm sure I've done it before, is ... How can I specifically create a new version of the current generation?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Oct 07, 2008 2:06 am
Reply with quote

Hello,

Quote:
How can I specifically create a new version of the current generation?
I believe you already answered your question (unless i misunderstand icon_smile.gif ).

Let's say the current generation is G0003V00. Then
Quote:
you explicitely create A.B.C.G0003V01
If i've misunderstood, please let me know and we'll get it right.
Back to top
View user's profile Send private message
helga

New User


Joined: 11 Sep 2006
Posts: 23

PostPosted: Tue Oct 07, 2008 2:11 am
Reply with quote

yes, it was poorly worded, but there's no Edit button ???


I meant, create a version using relative numbers like A.B.C(+0+1)


I thought I had done something like this before, but maybe I just used GnnnnV01



I did just cycle one through 9999 and it does go to 0001, which makes me wonder why they don't start Gen numbers at 00 like they do with Ver numbers, not that it really matters, it's just a little inconsistent.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Oct 07, 2008 2:21 am
Reply with quote

Quote:
it's just a little inconsistent
Yup, and the way COND= processes. . . It's just a little ibm. . . icon_cool.gif

Quote:
but there's no Edit button?
To keep down the possibility of people changing history icon_wink.gif If you enter something you really want changed, just send me a PM and i'll see what i can do.

d
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Tue Oct 07, 2008 1:45 pm
Reply with quote

So ..are the queris resolved..ot the dispute is still going on .. icon_wink.gif ..?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Oct 07, 2008 7:18 pm
Reply with quote

Hi Anuj,

I believe we're done. . . icon_smile.gif

d
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Wed Oct 08, 2008 12:29 pm
Reply with quote

That sounds nice.. icon_smile.gif

-Ad
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 GDG generation name to GDG Base name ... DFSORT/ICETOOL 3
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts DFHPI1008 JSON generation failed COBOL Programming 0
No new posts Started task using a generation dataset JCL & VSAM 7
No new posts Report generation JCL & VSAM 18
Search our Forums:

Back to Top