View previous topic :: :: View next topic

Author 
Message 
sriteja
New User
Joined: 25 Jul 2005 Posts: 15 Location: Hyderabad




Hello:
In the JCL statement SPACE=CYL(10,5) , what is the maximum number of cylinders allocated including secondary allocation.
Is it 10+5 or is it 10+(5*n) where n is a constant. (then what is the value of n)
Hope to get an answer soon
Sri 

Back to top 




shivashunmugam Muthu
Active User
Joined: 22 Jul 2005 Posts: 114 Location: Chennai




The amount specified by secondary will be added to the amount specified by primary up to fifteen times if there is sufficient space on the volume. For example, SPACE=(TRK,(5,10)) requests a maximum of 5+15(10)=155 tracks for a sequential dataset.
I think the above applicable for cylinders as well.....Correct me If I am Wrong 

Back to top 


sriteja
New User
Joined: 25 Jul 2005 Posts: 15 Location: Hyderabad




Thanks for your reply. It is same even for cylinders. I have checked by running a JCL. 

Back to top 


mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592




Hi Sri,
Just a cautionary note:
While 155 trks/cyls may be the max, the min is probably more important to know.
The system may use up to 5 extents to alloc your primary request and also use up tp 5 for each of the 15 2ndary allocs you requested.
In your example above you used 1 extent for the primary allocation annd 1 extent for each of the 15 2ndary allocations). Because of this you're probably unaware of this restriction: you only have a total of 16 extents to satisfy that allocation.
So, WORST case, you use 5 ext to alloc the primary; that leaves 10ext to alloc your 2ndary request. Now suppose it takes 5 ext to alloc the 1st; that leaves 6 for the other 14. Suppose it takes 5 ext for the 2nd; that leaves 1 for the other 14.
Guess what? If you're lucky you can find 10 contiguous trk/cyls for the 3rd and final 2ndary you can alloc.
That gets you a grand total of 35 trk.cyls.
If you can't alloc the last trk/cyls requested in 1 ext you'll abend.
One other thing:
If you allocate the file on multiple vols [unit=(n,sysda)] you'll get 16 extents on each vol you allocated the file to. For example, 3 units gets you 48 extents.
So remember you get 16 extents per vol NOT 16 allocations of requested space. 

Back to top 


harinatha
New User
Joined: 24 Jul 2005 Posts: 28




Hi mmwife,
Iam totally confused with the above answer.I did not understand properly. Can u explain to me with any example for the above points.
Thanks & Regards
Hari. 

Back to top 


sriteja
New User
Joined: 25 Jul 2005 Posts: 15 Location: Hyderabad




Dear mmwife,
I understood your cautionary note but i have a doubt.
Please letme know if my understanding is right:
An extent does not have a fixed size. It is like a page that can be 4K, 16K etc. And also we can define how much each extent in a volume can hold.
Or is it that irrespective of the volume size , each volume must have 16 extents that would be n/16 where n is the size of the volume.
I am asking this as i have a test dataset that has 31 cylinders and 16 extents allocated and i also have a prod. dataset that has 750 cylinders allocated in 1 extent.
Hope you have understood my question. In short is an extent similar to the page concept that does not have a fixed size value and
is every volume divided into 16 equal extents?
Thanks and Regards
Sri 

Back to top 


mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592




Hi Sri,
I should have mentioned that the system tries to get the requested space in one extent, if possible. But sometimes the volume is fragmented and there are no contiguous blocks of space equal to that requested.
In that case the system allocates the largest block of contiguous space it can find on the volume (this consumes 1 extent), then it attemps to acquire the remainder of the request via the 2nd extent. If it can't it keeps looking until it uses 5 extents. If 5 extents can't stisfy the request, the step will abend w/a Sx37.
This process if followed for both primary and 2ndary allocations. The difference being that it can do it up to 15 times for 2ndary.
HTH
Hari,
The above may have cleared up your doubts, too. If not, just let me know. 

Back to top 


karthik_ilango
New User
Joined: 02 Aug 2005 Posts: 1




hi mmwife,
Pardon me but i am new to mainframes. I am totally confused relating to the above discussion. Could you explain with the help of a good example, please. It would be really very helpful. Thanks in advance.
Karthik. 

Back to top 


mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592




Hi Karthik,
The key to understanding this is to realize that allocations and extents are NOT interchangeable concepts.
Space is requested in allocations via the SPACE param: one primary, 15 2ndary max.
These allocations are granted in extents of CONTIGUOUS space: a max of 5 extents can satisfy each alloc, primary or 2ndary. The only catch is you only get 16 extents to satisfy the 16 allocs requested.
Example, if you need 500 cyl for your primary and the disk has 1000 cyls availabel, BUT the space is split up into 10 pieces of 100 cyls each. The space is there but you have to use 5 extents to get the 500 cyls you need for the primary. That leaves you only 11 extents for the 15 2ndary allocations you may need. That's impossible because you only have 11 extents.
If the disk available to the alloc does not have the contiguous space to satisfy each of the primary and 2ndary allocs, more than 1 extent will be used to satisfy the allocation.
The more extents used to satisfy previous allocs, the less extents are left to satisfy those allocs remaining. For example, if you used 3 extents to satisfy the primary alloc, you only have 13 left for the 2ndary.
It's obvious you won't get 15 2ndary allocs w/13 extents. Even if the contiguous space was now available.
That's the best I can do. Sorry. 

Back to top 


Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 464




Hi mmwife,
Sorry to say
I did not get "If you allocate the file on multiple vols [unit=(n,sysda)] you'll get 16 extents on each vol you allocated the file to. For example, 3 units gets you 48 extents." in your first reply.
Could you please explain me this please
Thanks in advance
Rupesh.Kothari 

Back to top 


mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592




Hi Rupesh,
It means that instead of getting 15 2ndry extents for your file, you get 15 for the 1st volume allocated, 16 more for the 2nd, 16 more for the 3rd, etc.
You can allocate up to 59 vols for a dataset if your shop has them. So you'll get 15 + 16 * 59 extents of 2ndary space. 

Back to top 


