I have to dump duplicate records into a GDG and later count the number of records in this GDG and display the count as well as some other attributes from GDG into a flat file.
For this I am creating a new generation of the GDG
Did u check how many generations your GDG base can have?
The LIMIT is specified as 255.
Superk you were right about Catlg the GDG twice. I removed the PS033 and created the GDG in PS034 itself (though I had tried it earlier but could not succeed). The Jcl worked but has taken the previous GDG while counting the records using the below
If you create the GDG in the same job, then you MUST refer to its relative generation that was specified at the time of creation, if you create +1 then the GDG generation remains as +1 for the life of the job. So if this step is in the same job that created the +1, then use +1 in this step.
As for generations dropping off, are there any other controls on the number of generations in force by your storage group ? I for one have implemented controls on the number of generations allowed to exist at any one time.
Let's say that, before the job runs, DUPBAKER.STOREGDG.G0005V00 is the current generation.
Then, when the job is submitted, generation DUPBAKER.STOREGDG(+1) is the new generation, DUPBAKER.STOREGDG.G0006V00. That means than DUPBAKER.STOREGDG(0) is still the previous current generation, DUPBAKER.STOREGDG.G0005V00.
If you want to count DUPBAKER.STOREGDG.G0005V00, then your code is fine. If you want to count DUPBAKER.STOREGDG.G0006V00, then you need to change the SYNCTOOL DD statement to:
Hi Superk / Expat
I had the misconception that DUPBAKER.STOREGDG(+1) would create another GDG even in the COUNT step. But it is not so. Now it is working fine with a '+1' in COUNT step..
Thanks a lot for your valuable suggestions.