IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Question on GDG versions


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jithumohan

New User


Joined: 31 Jan 2008
Posts: 30
Location: Woodland Hills, CA

PostPosted: Mon Jan 05, 2009 11:27 am
Reply with quote

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
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Mon Jan 05, 2009 12:20 pm
Reply with quote

If you need to create it again as G0010V00,then you have to use two jobs.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jan 05, 2009 12:36 pm
Reply with quote

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
View user's profile Send private message
jithumohan

New User


Joined: 31 Jan 2008
Posts: 30
Location: Woodland Hills, CA

PostPosted: Mon Jan 05, 2009 3:24 pm
Reply with quote

I will go with 2 jobs. Thank you all for the help
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jan 05, 2009 3:35 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jan 05, 2009 5:07 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jan 05, 2009 5:14 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Jan 05, 2009 6:50 pm
Reply with quote

Quote:
he wants to keep only first generation..!

I think he wants to keep the last icon_lol.gif (generation number)
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jan 05, 2009 8:32 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Jan 06, 2009 2:10 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Question for file manager IBM Tools 7
No new posts question for Pedro TSO/ISPF 2
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts panel creation question TSO/ISPF 12
No new posts Sort w/OUTREC Question DFSORT/ICETOOL 2
Search our Forums:

Back to Top