Posted: Thu Dec 19, 2002 12:39 am Post subject: Version Number of a GDG
Hi Masters,
I am creating a new GDG Version as a abc(+1) in a particular step.
Now is it possible that I can get the exact version of this new dataset as abc.v00x00(with version number) in the same jcl or in a different proc. _________________ Maneesh Chawla
***If at first you don't succeed, destroy all evidence that you tried***
Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
Posted: Thu Dec 19, 2002 2:31 am Post subject:
Hi Maneesh,
I don't understand why you want to know the exact name of the GDG. If the job where you have created the GDG has not yet ended, then you can reference your newly created GDG in another step of the same job by appending (+1) to your GDG base. And if you want to reference it in another job, you can do so by appending (0) to the GDG base.
Can you please elaborate a little on your exact requirements wherein you need the exact name of the GDG.
Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
Posted: Thu Dec 19, 2002 3:19 am Post subject:
Yeah Maneesh . I now understand your requirements but I had not got your requirements earlier simply for the reason that I had not done that before - Getting the exact name of a GDG version.
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
Posted: Thu Dec 19, 2002 7:07 am Post subject:
I do not know a direct way of doing this. But, it can be surely be done in two steps. First, being IKJEFT01 or IDCAMS to get all entries for a GDG using LISTCAT. The second step will be an ICETOOLstep. (Sincs, I am in a hurry, I am not posting the code.)
The first step will list all entries for a GDG. To "clean" up this listing, INCLUDE only those records having NON-VSAM in them.
Use the O/P file from above as I/P for ICETOOL. Using INREC, pad sequence number and sort on this sequence number in descending order. Now, take the first record from the O/P file so generated (STOPAFT=1, etc).
Reformat the O/P as per your taste. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
I was trying to combine the first two TOOLIN statements into one. Though, the job ended sucessfully, the result was opposite. I got the oldest version as O/P. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
Posted: Fri Dec 20, 2002 9:14 am Post subject:
Maneesh chawla,
The following DFSORT jcl will give you the desired results.Cogito has the right idea but he is making 3 passes to get the data.You can avoid all that and do it in just 1 pass.
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
Posted: Mon Dec 23, 2002 4:09 pm Post subject:
GaneshB,
The above posted solution by me also works with syncsort. Let me know if you have any problem. If you have very old version of syncsort it might not support the endrec feature.If that is the case I will show you another way around.
Joined: 03 Dec 2002 Posts: 17 Topics: 5 Location: Columbus, GA
Posted: Mon Dec 23, 2002 4:18 pm Post subject:
Hi Kolusu,
First of all let me apoligize for editing the question after I have posted. I think when you were answering, I was changing the question. Anyway as you said it seems our system wont support the endrec feature. It would be great if you post the other solution. _________________ Regards,
Ganesh.B
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum