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

Extents in primary and secondary space allocation


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

New User


Joined: 20 Jul 2009
Posts: 23
Location: Mumbai

PostPosted: Sun Dec 27, 2009 9:15 pm
Reply with quote

Hello

I am a bit confused about the extents in primary and secondary space allocation.I have read the manual and it says 16 extents are possible for a PS dataset in a single volume.I want to know the number of cylinders that will be used if all the 16 extents are filled up.

for SPACE=(CYL,(200,50))


I have also checked some threads but I am not clear.


They have broken the primary allocation into 5 extents(like 200=100+40+30+20+10) but for secondary allocation they have multiplied 50 by 11.But if you go by the same rule that applies to primary
I think 50 cylinders should be divided in 11 extents..



Can anyone pls clarify why the secondary allocation is multiplied by 11 whereas the primary is not.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sun Dec 27, 2009 10:05 pm
Reply with quote

The primary allocation can be filled in as many as five extents. If there is not enough free space to complete the primary allocation within 5 extents, the allocation fails with a space error. It may be filled in 1 extent, or any number up to 5 extents. The number of potential secondary extents is 16 minus the number of extents used to fill the primary request. So if 1 extent was used for the primary, 15 remain for the secondary, but if 5 extents were required for the primary there are only 11 possible secondary extents. The maximum size of the data set is 950 cylinders (200 for the primary, 15 times 50 = 750 for the secondary extents). If the primary required 5 extents, the maximum size of the data set is 750 cylinders.

Please note that the limit can be affected by having multiple packs for the data set; a single data set can use as many as 59 volumes.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Mon Dec 28, 2009 12:09 am
Reply with quote

Isn't it also true that the introduction of SMS lifted the 16-extent maximum?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Dec 28, 2009 2:00 am
Reply with quote

From the z/OS V1R10.0 JCL Reference manual (link at the top of the page), section 12.59.2.1:
Quote:
When you specify a secondary quantity and the data set requires additional space, the system allocates the specified quantity:

* In contiguous tracks or cylinders, if available.

* If not available:

o If the data set does not have the space constraint relief option, in up to five extents.

o With the space constraint relief option, the system might have to allocate more than five new extents. A data set has this option only if it is SMS-managed and the data class specifies the option.

The system can allocate up to 123 extents for a data set on a volume if it is a PDSE, an HFS data set, an extended format data set, or a VSAM data set in an ICF catalog. For other types of data sets the system can allocate up to 16 extents for each data set on each volume. An extent is space that may or may not be contiguous to other space allocated to the data set. The extents for a data set include the primary quantity space and user-label space.
Back to top
View user's profile Send private message
Ankit Kumar Gupta

New User


Joined: 08 Jan 2011
Posts: 16
Location: India

PostPosted: Thu Jan 20, 2011 8:33 am
Reply with quote

Hi Robert,

I have one question like as you mentioned
Quote:
" if 1 extent was used for the primary, 15 remain for the secondary, but if 5 extents were required for the primary there are only 11 possible secondary extents"


How will it decide how many to use from primary and then go for secondary?

like in one case, it uses 1 primary extent and then starts looking for secondary whereas in other case, it uses 5 primary and then started looking for secondary extents.

Is it based up on some contiguous space available for primary extents ?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Jan 20, 2011 9:18 am
Reply with quote

Hi,

I'm only repeating what has already been stated.

Primary quantity has to be satisfied in full before it uses secondary quantity.

ie. if primary quantity is 900 cyls, the system will attempt to allocate the space in contiguous cyls if available, if not, 900 cyls can take up to five extents.

Quote:
The primary allocation can be filled in as many as five extents. If there is not enough free space to complete the primary allocation within 5 extents, the allocation fails with a space error. It may be filled in 1 extent, or any number up to 5 extents. The number of potential secondary extents is 16 minus the number of extents used to fill the primary request.



Gerry
Back to top
View user's profile Send private message
Ankit Kumar Gupta

New User


Joined: 08 Jan 2011
Posts: 16
Location: India

PostPosted: Sat Jan 22, 2011 1:39 am
Reply with quote

Thank you guys....... I got it. Thanks again
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Thu Jan 27, 2011 9:19 pm
Reply with quote

Check if your dataset has a DATACLAS with Space Contstraint Removal as well. That means Primary extents can be broken down into many, even more than 5. It will also do that for the first extent taken on subsequent volumes it extends to.

Just to confuse the issue further, the system will 'join' extents together if there is space available on the volume immediately after the previous extent, so you don't actually have another extent, just a larger version of the original.

If the dataset is Extended Format (also determined by it's DATACLAS)) it can have up to 123 extents per volume even if it is QSAM (PS) and can be GT 65k tracks per volume.
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
Search our Forums:

Back to Top