View previous topic :: View next topic
|
Author |
Message |
pavandmohanthy Warnings : 1 New User
Joined: 14 Oct 2006 Posts: 1 Location: MUMBAI
|
|
|
|
Hey techno's,
Can anyone of you tell me how a GDG will be created??
i think u all will laugh at me by asking this but what i am asking for is when a GDG of a new version willbe created ?? means...
If FILENAME.G0000V00 is existing and i want to create a copy of this with same name, & generation but with different version... ie.,
FILENAME.G0000V01 and tell me how to represent this?
Usually we represent the present generation as FILENAME(0) and as being a new version how will we represent the GDG???
Pls help me out ............
|
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Pavan,
As Bill suggests, look at that prior post.
I suspect that you don't really have FILENAME.G0000V00, but something with FILENAME.GnnnnV00 where nnnn is 0001 or greater.
When you read the "current" generation of a gdg, specify dsn(0) in your JCL. If you want the previous generation, specify dsn(-1) and to create the "next" generation, specify dsn(+1).
If your process calls for reading all of the cataloged generations of the gdg, specify the dsn with no qualifier (i.e. this could be used for "stacking" all of a day's sales that are to be read into the nightly accounts recievable job. Each location that has sales information "sends" their sales and a job reads and validates the custom sales data and creates a (+1) of the "common" daily-sales file. When the nightly recievables job is run, it reads the daily-sales file with no qualifier, which will process all generations with a single DD statement an no concern about whether a particular location has transmitted or not. If each location has a unique file, managing the receivables job is horrible. Special attention must be given to each location that reported no sales. One of my sites has 400+ sales and distribution locations and managing all of those files would be impossible.
Probably more than you wanted, but it is a fairly good example. . . |
|
Back to top |
|
|
deepak.vl
New User
Joined: 17 Feb 2007 Posts: 38 Location: Hyderabad
|
|
|
|
Gr8 one Dick
This raised one more question in my mind. Suppose in a JCL, i've created a new generation of a GDG by specifying (+1) in a step and I need to refer to the same generation in any of the subsequent steps. How do I refer that? Do I need to specify (+1) or (0)? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Again, I think the answer is that you can't without specifing the GnnnVnn.
Again, a search will find very knowledgable people already answering these questions. |
|
Back to top |
|
|
deepak.vl
New User
Joined: 17 Feb 2007 Posts: 38 Location: Hyderabad
|
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
You are right, I still had my Vnn hat on..... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you have a many-step job and the (+1) is created early in the job you can use (+1) through-out the job. I would caution against doing this unless the job has very few steps.
Here's why. . .
Let's say the job has 20 steps. The (+1) is created in step3. The job abends in step 12. Let's also say that all of the steps from step10 thru step20 refer to the (+1) dataset. Your restart may be ugly. . .
If the new data was written to a non-gdg file, it could be written to a (+1) as a new step21 by simply coping the data. Restart/rerun is greatly simplified. If the data is too large, the (+1) could be created "immediately" and all of the remaining steps placed in another job that is dependent on the first job's successful completion or the creating job could send the "next" job thru the internal reader. If a second job was used, it would read the dataset as (0) and there would be no problem with gdg version in the restart. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
deepak.vl wrote: |
Suppose in a JCL, i've created a new generation of a GDG by specifying (+1) in a step and I need to refer to the same generation in any of the subsequent steps. |
This is a FAQ is see posted a lot. I can never figure out WHY someone would to do this, at least within the same job. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
One situation that i see fairly often is when early step(s) apply "transactions" to the "master file(s)". Then, subsequent steps in the job use the "new master file(s)" for reporting or data extracts to feed other processes.
My preference is to end the "update" job and start a new job that uses dsn(0) for the input "master file(s)". As i mentioned earlier, this greatly simplifies any needed restarts. Needing a restart (say due to an x37) is bad enough - taking more time and possibly running an invalid job due to some convoluted restart is even worse. IMHO. . . |
|
Back to top |
|
|
|