View previous topic :: View next topic
|
Author |
Message |
dkalyan_c
New User
Joined: 06 Apr 2006 Posts: 17
|
|
|
|
hello !!
i want to create a new GDG generation in step 1 of my jcl
this generation should be input to step2 and step 2 creates a second generation.This second generation is input step3 and step3 creates a third generation.
now, how do i refer the generations in my JCL
STEP1 - generation(+1)
STEP2 - INPUT -generation(+1)
OUTPUT - generation(+2)
STEP3 - INPUT -generation(+2)
OUTPUT - generation(+3)
is the above one correct? or i should always refer the current generation as generation(0)? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you reconsider the process. . . What reason is there to create 3 new generations of the same fle in one job?
There is probably no need to create 3 new generations in a job. If you create some intermediate files and then a new +1 at the end, you will have everything you need.
Unless there is something i misunderstand. . .
Quote: |
is the above one correct? |
That could work, but may cause problems if there is a need to restart after some abend. |
|
Back to top |
|
|
naveensrimf
New User
Joined: 04 Oct 2005 Posts: 34
|
|
|
|
Above one is correct.
Please see the example for you.
// Step1 exec=ABC1
//File1 dd DSN=XYZ.ABC.123(+1),Disp=shr
//File 2 dd DSN=XYZ.ABC.123(+2),Disp=(new,catlg,delete),
.
.
// Step2 exec=ABC2
//File2 dd DSN=XYZ.ABC.123(+1),Disp=shr
//File 3 dd DSN=XYZ.ABC.123(+2),Disp=(new,catlg,delete),
.
.
//Step3exec=ABC3
//File3 dd DSN=XYZ.ABC.123(+1),Disp=shr
//File4 dd DSN=XYZ.ABC.123(+2),Disp=(new,catlg,delete), |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Please see the example for you. |
The example posted is not correct. . . Do not post "solutions" that have not been tested. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Generations are not cataloged until the end of the job; if you build a new generation it is (+1) throughout the entire job. If you build another new generation, it is (+2) throughout the entire job. and so forth.
However, as Dick said, you will have problems with such an approach. One thing that is pretty much guaranteed with production jobs is that they are going to have problems sooner or later. Having someone trying to figure out how to do a restart at 3 AM of a job that creates three new generations will be challenging, at the least. |
|
Back to top |
|
|
prem_ibm
New User
Joined: 15 Sep 2007 Posts: 31 Location: Chennai
|
|
|
|
Hi All,
Please clarify below :--
Whether its Depend on JES....?
1) Generation will be Cataloged after succesfull execution of Job....when JOB ENTRY SYSTEM (JES2)....(agree) i have tested for JES2,whether it will be same for JES3.
Thanks
Prem... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
i have tested for JES2,whether it will be same for JES3. |
As far as i know generation datasets work the same. I don't have a jes3 system to use to confirm. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi Dick !
JES2:
Generation will be Cataloged after succesfull execution of Job
JES3:
Generation will be Cataloged after succesfull execution of Step |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
There's no difference between JES2 and JES3 as to how relative generation references work. From the JCL User's Guide Appendix A:
Quote: |
Relative Generation Numbers
When creating a generation data set, the relative generation number tells the system whether this is the first data set being added during the job, the second, the third, etc. When retrieving a generation data set, the relative generation number tells the system how many data sets have been added to the group since this data set was added.
The first time you use a relative generation number for a generation data group within a job, the system establishes the relationship between the relative generation number and the absolute generation number. The system maintains this relationship throughout the job.
For example, if you create a generation data set with a relative generation number of (+1), the system recognizes any subsequent reference to (+1) throughout the job as having the same absolute generation number.
Relative generation numbers are obtained from the catalog as it existed:
* For JES2, at the beginning of the first step that specifies the generation data set by relative generation number.
Note: In a shared DASD environment, if two or more jobs running on different systems simultaneously create new generations of the same data set, one of the jobs could fail with a JCL error.
* For JES3, when the job is set up, and again by the system at the beginning of the first step that specifies the generation data set by relative generation number. If the most recent data set is not the same at both times, the results are unpredictable. |
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
I have to disagree with this
Code: |
JES2:
Generation will be Cataloged after succesfull execution of Job |
A generation is cataloged after a step completion depending on the DISP
Gerry |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Note that it does not matter when the generation is cataloged, the first reference to a relative generation number fixes the sequence for the entire job. The manual has an example where the (-1) generation is used in step 1 and that refers to absolute generation 7. Step 2 deletes all generations and step 3 allocates a (+1) entry. Since the relative numbers were fixed at the time of first reference, the absolute generation cataloged in step 3 is G0009V00, even though generations up through G0008V00 were deleted in step 2. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Morning Robert !
I only talked about the time when cataloging come true.
And sorry, when something changed within the last 20 years.
But in those days, that was the crucial difference in this surroundings. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
UmeySan, the manual is not clear about precisely when a generation is cataloged -- and it appears that SMS managed GDGs are handled differently from non-SMS GDGs -- but the handling of relative generations hasn't changed in a long time. |
|
Back to top |
|
|
|