IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

GDG's creation in JCL


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

New User


Joined: 15 Mar 2012
Posts: 5
Location: India

PostPosted: Tue Jan 21, 2014 6:51 pm
Reply with quote

If we have a GDG with limit as 10. and daily one generation use to create. Now, suppose 10 generations has created. on 11th day i have changed the limit of same GDG as 2. so, on 11th and 12th day 2 more generation will get create.

what would happen on 13th day? will job abend or it should override the 1st generation or it should override the 11th generation?

Thanks,
Megha
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


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

PostPosted: Tue Jan 21, 2014 7:10 pm
Reply with quote

What happens depends on how your GDG base is defined. Why not set up a test gdg base and keep adding datasets to it and see what happens?
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 865
Location: The Universe

PostPosted: Tue Jan 21, 2014 7:13 pm
Reply with quote

When you define a generation data group index, you specify three attributes -
  • LIMIT - the maximum number of data sets you can have in the generation data group at any one time.
  • EMPTY - Delete all the data sets in the group if you attempt to allocate a data set in excess of the limit. In 45+ years I have never seen a generation data group defined with this attribute.
  • SCRATCH - Delete the "oldest" data set in the group when you allocate a data set in excess of the limit.
You can use the IDCAMS ALTER command to change these attributes. However, if you attempt to reduce the LIMIT and there are more data sets in the group than in the new LIMIT, the command will be rejected, and the LIMIT will not be changed. Obviously you can delete the excess data sets before you change the limit.

You cannot do the scenario you have proposed.

See the DEFINE GENERATIONDATAGROUP topic in DFSMS AMS for Catalogs for the z/OS release you are running.
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 197
Location: UK

PostPosted: Tue Jan 21, 2014 8:27 pm
Reply with quote

steve-myers wrote:
You can use the IDCAMS ALTER command to change these attributes. However, if you attempt to reduce the LIMIT and there are more data sets in the group than in the new LIMIT, the command will be rejected, and the LIMIT will not be changed. Obviously you can delete the excess data sets before you change the limit.


That's not my experience, and I've just tried it again. Reducing the limit causes the older GDS's to be deleted. So if your existing limit is 5, and you alter it to 2, the 3 oldest ones will be deleted.

I assume there is a parameter or some other setting that controls this.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


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

PostPosted: Wed Jan 22, 2014 7:20 am
Reply with quote

Nic's answer is THE BEST - you should always trust what a (very) simple test sequence tells you over what someone just says. Then you become the expert and teacher.
Back to top
View user's profile Send private message
Megha Gupta

New User


Joined: 15 Mar 2012
Posts: 5
Location: India

PostPosted: Wed Jan 22, 2014 1:31 pm
Reply with quote

Thanks all for your suggestions!
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

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Creation of Datasets dynamically on t... DFSORT/ICETOOL 8
No new posts REXX - Dynamic file Creation CLIST & REXX 7
No new posts Dynamic output file creation in cobol... COBOL Programming 8
No new posts ISPF Tables Creation TSO/ISPF 6
No new posts How to detect file creation event? All Other Mainframe Topics 5

Back to Top