View previous topic :: View next topic
|
Author |
Message |
jithumohan
New User
Joined: 31 Jan 2008 Posts: 30 Location: Woodland Hills, CA
|
|
|
|
In my JCL, In step1 I will going to delete latest generation data set for that i gave gdgname(+0). In step2 I want to copy datas from another dataset to the current version. Can I do this in the same job?
eg: In step1 I have deleted the version G0010V00 of a GDG. In step2 I am trying to copy datas from another flat file to the GDG version G0010V00. Is this possible to do in the same job?
I tried to do this in the following way. In step1 I deleted the GDG using '(0)' and in step2 I copied the datas using '(+1)'. But it creates an extra version. The GDG version G0010V00 got deleted and a new version G0011V00 has been created. When I tried '(0)' in both steps it shows JCL error. Please give me a solution. |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
If you need to create it again as G0010V00,then you have to use two jobs. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you re-think the approach being used. If i understand what you want to do, you are using a gdg in a not typical way. Typically gdg generations are created to be retained for some amount opf time or some number of iterations. Typically, schemes that try to replace generations have proglems with knowing which data is available and how to handle restarts.
If you explain what the data requirement is or what business function this will support, we may be able to offer alternative suggestoins. |
|
Back to top |
|
|
jithumohan
New User
Joined: 31 Jan 2008 Posts: 30 Location: Woodland Hills, CA
|
|
|
|
I will go with 2 jobs. Thank you all for the help |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I suppose that you could have just written to gdg.base(0) rather than delete it and then try to recreate it. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Quote: |
you could have just written to gdg.base(0) rather than delete it and then try to recreate it. |
But then every time a next generation will be created..& he wants to keep only first generation..! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
But then every time a next generation will be created..& he wants to keep only first generation..! |
Where does he say that ?
What I meant was, do not delete gen 0, merely write over it |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
he wants to keep only first generation..! |
I think he wants to keep the last (generation number) |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Unless/until additional information about the requirement is posted, i still believe it is not a good candidate for being a gdg. . . |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
The approach he has shown seems to be a way to meet his requirement but I don't think it's the actual requirement. I second to Dick:
Quote: |
Unless/until additional information about the requirement is posted, i still believe it is not a good candidate for being a gdg. . . |
|
|
Back to top |
|
|
|