Skip to Content
Custom Search

How to calculated maximum space using primary and secondary units

5 replies [Last post]
    This used to be the



This used to be the case a great many years ago.  Anyone that has kept up with the various data set types ... large, extended format... would say it depends.


DSN type large while still constrained by the 16 maximum extents on a volume is not constrained by the 65535 track limit nor limited to a single volume.  Typically, the extend to the volume2-n will use the secondary space allocation, but it is dependent on SMS and the JCL that allocated the data set.


DSN type extended is not limited by the 16 maximum extents on a volume nor by the 65535 tracks per volume.  The maximum extents primary-and-secondary allocation is 123 and can extend across multiple volumes.  It also is dependent on the SMS setup as to whether primary or secondary allocation is used on volume2-n.


So, while the basics that have been discussed are true.  They aren't all that is on z/OS. I would strongly recommend which details all of the data set formats for z/OS



The answer to your question of why you would use the factor of 15 is because your space is taken in either blocks, cylinders, or in your case tracks. Their are 15 tracks = 1 cylinder. When allocating space the first allocation number is the primary allocation that must be contiguous and then the system allows 15 more extents to get your secondary allocation which does not need to be contiguous. In your example space=(trk,(10,5)) the primary allocation would be 10 tracks, the secondary allocation is 15 extents more of 5 tracks = 75 tracks total plus the 10 primary = 85 tracks total for that DSN. Hope this helps



Janet, your explanation is good but misses out one small point. Many mainframe systems, if they can't find the primary allocation as contiguous space, will try and get it in up to 5 extents before failing. As a corollary to this, if the systems takes, for example, 4 extents to allocate the primary space request, you only get 12 secondary extents as the maximum number of extents remains at 16. To use the example given by Krishna, this would give you a maximum of 10+(12*5) = 70 tracks - less than the 85 you would expect had the system found 10 contiguous tracks - before the system abends your job.

David - (from linkedin)




You are correct there are only 16 extents total allowed no matter what the combination of the primary or secondary is allocated. In my experience of 30 years we always tried for the primary allocation to be the majority or all of the DSN size (quicker to read back in) and structured our data center in that way however, there were times when it couldn't be done therefore the secondary allocation would be utilized. If the contiguous primary allocation couldn't be found after the system checked all the pack pool then the job abended and the proper steps would be taken to either allocate a lower primary allocation of what continguous space was available(to get the job up and running), or add more packs to the pool. The secondary allocation was for growth of the DSN without having the job abend. Your point well taken. Thanks for the reminder!!

Janet (from linkedin)

total diskspace

Your formula is correct. A dataset can have maximum of 16 extends. 
Since your primary allocation is 1 extend, you can still have 15-times the secundary allocation.


Click the +1 button  below to share it with your friends and colleagues


Share this if you liked it!



Dr. Radut | forum