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
 

 

GDG generation define and reference..
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
quanzhong

New User


Joined: 12 Aug 2008
Posts: 46
Location: china

PostPosted: Fri Sep 19, 2008 6:03 pm    Post subject: GDG generation define and reference..
Reply with quote

Hi,
now i am meeting a problem..
in my job can be seen as follows in short.
Code:

step1  //*create a GDG generation refered by program.
//ABSO     DD  DSN=&HLQ..CMS.ABSO.S&BSEG..BKP(+1),
//             DISP=(NEW,CATLG,DELETE),           
//             UNIT=&DISK,SPACE=(CYL,(10,10)),     
//             DCB=(&GDGMOD,RECFM=VB,LRECL=2307)   
//*
......
step5
......
step9 //*use that generation
//ABSI     DD  DSN=&HLQ..CMS.ABSO.S&BSEG..BKP(+1),DISP=OLD
......

unfortunately, my job failed at step5, after getting through all mistakes,
i restarted that job, but job failed again at step9...with collegue's suggestion, I override that statement.
Code:

//ABSI     DD  DSN=&HLQ..CMS.ABSO.S&BSEG..BKP(+0),DISP=OLD

and i got what wanted... though the problem had resolved, but i want to know why, and how to avoid that kind of mistake.

as the job spool has been cleared, so I couldn't provide the error message.. Hope that you all can get my problem..
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: Fri Sep 19, 2008 6:08 pm    Post subject:
Reply with quote

The relative generation is +1 for the whole job. Once the job ends or abends the +1 then becomes 0 for any restart / reun of the job.
Back to top
View user's profile Send private message
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Fri Sep 19, 2008 6:13 pm    Post subject: Re: GDG generation define and reference..
Reply with quote

quanzhong wrote:


unfortunately, my job failed at step5, after getting through all mistakes,
i restarted that job,



I guess you would have restarted the JOB after STEP1. So the GDG numbers are updated with the version created in previous run (Run that has failed). When you restart the JOB there is no +1 version (as it has already been made version 0). So it has failed.
Back to top
View user's profile Send private message
quanzhong

New User


Joined: 12 Aug 2008
Posts: 46
Location: china

PostPosted: Fri Sep 19, 2008 6:15 pm    Post subject:
Reply with quote

Hi,
can you provide a link on GDG? thanks..
It seems that related material is very limited.
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: Fri Sep 19, 2008 6:22 pm    Post subject:
Reply with quote

hchinnam

Quote:
I guess you would have restarted the JOB after STEP1. So the GDG numbers are updated with the version created in previous run (Run that has failed). When you restart the JOB there is no +1 version (as it has already been made version 0). So it has failed.

The correct terminology is GENERATION not version.

These two terms are perfectly valid in reference to GDS but with completely different meanings. Please use the correct terms when addressing a question, because if you do not know what you are talking about how can anyone else be expected to.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Sep 19, 2008 6:25 pm    Post subject: Reply to: GDG generation define and reference..
Reply with quote

3.10 Chapter 29. Processing Generation Data Groups from the z/OS V1R7.0 DFSMS Using Data Sets manual.

APPENDIX1.2 Appendix B. Generation Data Sets from the z/OS V1R6.0 MVS JCL User's Guide.
Back to top
View user's profile Send private message
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Fri Sep 19, 2008 6:28 pm    Post subject:
Reply with quote

expat,

point noted.

However one quick question. Do you know when VERSION number of a GDG generation changes. I never seen one with a value other then zero.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Sep 19, 2008 6:50 pm    Post subject:
Reply with quote

hchinnam wrote:
However one quick question. Do you know when VERSION number of a GDG generation changes. I never seen one with a value other then zero.


From the above links:

Quote:

The number of generations and versions is limited by the number of digits in the absolute generation name; that is, there can be 9,999 generations. Each generation can have 100 versions.
The system automatically maintains the generation number. The number of generations kept depends on the size of the generation index. For example, if the size of the generation index permits ten entries, the ten latest generations can be maintained in the GDG.

The version number lets you perform normal data set operations without disrupting the management of the GDG. For example, if you want to update the second generation in a 3-generation group, replace generation 2, version 0, with generation 2, version 1. Only one version is kept for each generation.

You can catalog a generation using either absolute or relative numbers. When a generation is cataloged, a generation and version number is placed as a low-level entry in the GDG. To catalog a version number other than V00, you must use an absolute generation and version number.

You can catalog a new version of a specific generation automatically by specifying the old generation number along with a new version number. For example, if generation A.B.C.G0005V00 is cataloged and you now create and catalog A.B.C.G0005V01, the new entry is cataloged in the location previously occupied by A.B.C.G0005V00.
Back to top
View user's profile Send private message
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Fri Sep 19, 2008 6:53 pm    Post subject:
Reply with quote

Thanks Kevin
Back to top
View user's profile Send private message
quanzhong

New User


Joined: 12 Aug 2008
Posts: 46
Location: china

PostPosted: Fri Sep 19, 2008 7:19 pm    Post subject:
Reply with quote

Hi superk

thanks.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Fri Sep 19, 2008 8:21 pm    Post subject:
Reply with quote

Kevin,

Got a bit confused between these....... icon_rolleyes.gif

Quote:
Each generation can have 100 versions.

Quote:
Only one version is kept for each generation.

Thanks,
Arun
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Sat Sep 20, 2008 1:07 am    Post subject:
Reply with quote

Arun,

In GxxxxVyy, "yy" can have values from "00" to "99" so in total 100 differnt versions mathematically, but only one version (in SMS) can exist for a given GDG.

If generation A.B.C.G0005V00 is cataloged and you now create and catalog A.B.C.G0005V01, the new entry is cataloged in the location previously occupied by A.B.C.G0005V00. The old entry is removed from the catalog, to make room for the newer version, and may or may not be scratched depending on what limit processing options are specified for the GDG base.

For SMS DSNs, if scratch is specified, the older version is scratched from the volume. If noscratch is specified, or if the attempt to scratch the DSCB fails, the older version is not scratched and the generation data sets is recataloged as a non-VSAM data set with the GnnnnVnn name not associated with the GDG base.

Try allocating a new "version" for an existing GDG & look the entris in 3.4, things will be rather clear.

For non-SMS DSNs, if noscratch is specified for the base, the older GDS version is not scratched.
Back to top
View user's profile Send private message
quanzhong

New User


Joined: 12 Aug 2008
Posts: 46
Location: china

PostPosted: Sat Sep 20, 2008 3:19 am    Post subject:
Reply with quote

Hi, Anuj
now i have a question, in what situation cause to the change of GDG version, update? rename? or other ways.. and want to know GDG version's advantage.. because we seldom see other version but ***v00.
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: Sat Sep 20, 2008 5:16 am    Post subject:
Reply with quote

Hello,

It is probably enough to know that is such a thing as a version. It is not something you are likely to use for your work. I would surely not look for some "problem" that required me to use this "solution".

I don't know that there is any "advantage". It is just a feature - one that is not often used. As you mentioned: "because we seldom see other version but ***v00".

It is probably most important to remember that these are Generation Data Sets and when a new entry is cataloged (+1), this is a new generation icon_smile.gif
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: Sat Sep 20, 2008 2:49 pm    Post subject:
Reply with quote

I must admit that in 30+ years on IBM mainframes I can honestly admit to never ever using a version of a GDS.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Sun Sep 21, 2008 7:07 am    Post subject:
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    Post subject: Reply to: GDG generation define and reference..
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

Site Director


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

PostPosted: Tue Oct 07, 2008 2:06 am    Post subject:
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    Post subject: Reply to: GDG generation define and reference..
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

Site Director


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

PostPosted: Tue Oct 07, 2008 2:21 am    Post subject: Reply to: GDG generation define and reference..
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts VSAM define for large file jerryte JCL & VSAM 9 Wed Oct 05, 2016 1:51 am
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts How to define PCB for paired segments ashok_uddaraju IMS DB/DC 4 Tue Jun 14, 2016 11:40 pm
No new posts Define Alias for multiple Data sets u... sandy98669 JCL & VSAM 4 Fri May 27, 2016 1:07 pm


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