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

Bcking Up GDG generation for a particular time period


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

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Mon Aug 06, 2012 4:01 pm
Reply with quote

hi ,

I have a job that creates GDG generations every day ( Max 30 generations). At end of month , i need to back up the generation of that month to a Tape file.

Is there a easy way to identify the creation data of the generations so that i can back up only the files of that month .

Some one suggested LISTCAT , but that will require me to run it 30 times right ? am not sure , correct me if i am wrong.

Please suggest if there are any other ways.


Note: My GDG generations don't have date inside the file so i cannot depend on the content of the file.
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Mon Aug 06, 2012 4:52 pm
Reply with quote

No, if you specify the GDG base name in your LISTCAT, results for all generations will be returned (couldn't you have tried that? - it took me about 30 seconds to confirm it).

It all seems a bit laborious though, and rather defeats the point of using GDG's. If it was me I would be more inclined to come up with some other solution that suited your requirements, such as backing up the last 31 gens (accepting that you may get more than a month's worth) or backing up everything and then deleting them all.

I'm sure there are other options as well.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Aug 06, 2012 4:54 pm
Reply with quote

What do you do with the datasets after they are backed up? If nothing then you can delete them and next moth just specify the GDG base name and it will pickup all generations created since the last lot were deleted.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Mon Aug 06, 2012 5:17 pm
Reply with quote

Since you say "creates GDG generations every day" (your plural), do you mean one generation per day, or max 30 per day?

Assuming the former, you know that some months have 31 days. How does your "max 30 generations" scheme handle that?

Assuming the latter, then you can forget it, since 31*30 > GDG max LIMIT of 255.

How about some clarity please?
Back to top
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Mon Aug 06, 2012 5:39 pm
Reply with quote

@Phrzby Phil

Its one generation per day , max bussiness day per month will be 22- 23 not beyond that .

@ Nic Clouston
Thanks you are correct deletion may work but
i actually need those files for some downstream processing .



Thanks for the responses.
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 Aug 06, 2012 6:08 pm
Reply with quote

You're not consistent with your description, this from your first post
Quote:
I have a job that creates GDG generations every day ( Max 30 generations).
and this from your latest:
Quote:
Its one generation per day , max bussiness day per month will be 22- 23 not beyond that .
Talking about "Business Day" might buy you some argument but there is good number-of-generation difference between both of the statements.

If you've a ready-made solution by using LISTCAT, I'd say, use that. As David has already indcated how it'll work.

On the other hand if you know what is last "business day" for a given month, execute another Job to back-up GDGs, no?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Mon Aug 06, 2012 11:11 pm
Reply with quote

Quote:
@ Nic Clouston
Thanks you are correct deletion may work but
i actually need those files for some downstream processing .



Why don't you wait until you are finished wiith the downstream precessing, then use the method suggested by Nic?

The copy all generations and delete is an approach I use often.
Rather than finding ways it will not work, find ways that it will.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 581
Location: London

PostPosted: Wed Aug 08, 2012 5:18 pm
Reply with quote

Sometimes GDG's are not the ideal solution. What about using a normal flat-file and MODing to it each day, and at the end of the cycle copy it to a monthly GDG and then clear down your flatfile to start again.
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 To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts C Compile time time stamps Java & MQSeries 10
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts DFHPI1008 JSON generation failed COBOL Programming 0
Search our Forums:

Back to Top