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

Allocated cylinders of a dataset


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Akil

New User


Joined: 24 Oct 2023
Posts: 22
Location: India

PostPosted: Wed Oct 25, 2023 11:12 pm
Reply with quote

Hello,

I have allocated a dataset with primary =556 & secondary 556 like below:

Template temp1 dsn 'xxxxx'
disp(new,catlg,delete)
unit sysda
space(556,556) cyl

After the dataset is allocated ,when I give "I" in 3.4 for this ds.I see below:

General data: current allocation:
mgmt class: xxx ----- allocated cyl:5556
vol serial: xxx ---- allocated:55
rc format:vb
record length :4591 --- current utlization:
block size:27998---- used cyl:5556
1sy extent cylinder:265 --- used ext:55
secondary cylinders:556----

I need to unload /load prod data for a testing ,so need help in understanding the space allocation/calculation:
1)How come the allocated cylinder goes to 5556 ,When i just mentioned 556,556 in my ds allocation.how to calculate this?
2)How do we estimate the extents?
3)how come the primary was just 265 ,when I gave 556 in my dataset allocation in jcl.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1211
Location: Bamberg, Germany

PostPosted: Fri Oct 27, 2023 6:55 am
Reply with quote

0) Important to you are DCLS and JCL, not MCLS values
1) Maybe you have more data than you have initially thought?
2) RECLEN, BLKSIZE, DCLS for ex.
3) Primary Alloc can be done in 5 Extents (JCL basics), so 265 Cyls was merely the first one you've spotted.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Fri Oct 27, 2023 12:32 pm
Reply with quote

Primary and Secondary allocations can be taken in up to 5 extents. The extent sizes depend on a number of factors such as fragmentation on the volumes, and settings in the DATACLAS such as Space Constraint Relief which can reduce allocations to fit available space if necessary.

In this case the dataset has taken 55 extents that in total add up to 5556 cyls. The first extent of the primary just happened to be 265 cyls.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1211
Location: Bamberg, Germany

PostPosted: Fri Oct 27, 2023 1:47 pm
Reply with quote

SCR can also be used to relax the 5 extent limit, but I didn't want to extent my explanation in that way.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Fri Oct 27, 2023 2:39 pm
Reply with quote

Joerg.Findeisen wrote:
SCR can also be used to relax the 5 extent limit, but I didn't want to extent my explanation in that way.


Yeah, allocation is quite complex when you look into it. All sorts of things come into play depending if VSAM, DSNTYPE, extent consolidation, guaranteed space, VOL/UNIT counts and Additional Volume Amount, Dynamic Volume Count, Extent Constraint Relief in Dataclas, use of LIKE=, EAV TMS/CMS and Sliding Secondaries with DB2 tables. Nightmare to try and explain at times. I have it saved away for when the questions come.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1211
Location: Bamberg, Germany

PostPosted: Fri Oct 27, 2023 3:21 pm
Reply with quote

@Pete: Thanks for the laugh, I know exactly what you are referring to.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1741
Location: Tirupur, India

PostPosted: Fri Oct 27, 2023 7:10 pm
Reply with quote

Quote:
Primary and Secondary allocations can be taken in up to 5 extents.


This is the first time I am hearing about 5 extents. I thought it was a typo, and it comes from two experts, so I am confused now.

www.ibm.com/docs/en/zos/2.3.0?topic=asdav-primary-secondary-space-allocation-without-guaranteed-space-attribute

says,

"A sequential data set can have 16 extents on each volume."
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Fri Oct 27, 2023 7:51 pm
Reply with quote

vasanthz wrote:
Quote:
Primary and Secondary allocations can be taken in up to 5 extents.


This is the first time I am hearing about 5 extents. I thought it was a typo, and it comes from two experts, so I am confused now.

www.ibm.com/docs/en/zos/2.3.0?topic=asdav-primary-secondary-space-allocation-without-guaranteed-space-attribute

says,

"A sequential data set can have 16 extents on each volume."


A Basic QSAM dataset can have up to 16 extents per volume. If either primary or secondary is taken in more than one extent then each extent counts towards the total allowable 16 extents. They're also limited to 65k tracks in total, per volume.

An Extended Format QSAM dataset can have up to 123 extents on each volume. If either primary or secondary is taken in more than one extent then each extent counts towards the total allowable 123 extents. They're NOT limited to 65k tracks in size per volume and can be as large as the volume capacity.

There's also Large Format QSAM which is follows much the same rules as Basic QSAM for extents, but is NOT limited to 65k tracks per vollume.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1741
Location: Tirupur, India

PostPosted: Fri Oct 27, 2023 8:13 pm
Reply with quote

Wow.. Always thought primary quantity gets allocated in only 1 extent and not anymore. I believed it so firmly that I had to google it again after reading your post, and found another post from Robert saying the same thing

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.


humbling experience icon_smile.gif and good learning
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Fri Oct 27, 2023 8:22 pm
Reply with quote

vasanthz wrote:
Wow.. Always thought primary quantity gets allocated in only 1 extent and not anymore. I believed it so firmly that I had to google it again after reading your post, and found another post from Robert saying the same thing

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.


humbling experience :) and good learning


I fully understand. There are a few manuals and multiple sections within manuals that give partial explanations. It can take a while to collate it and get the full picture. There's a lot of different permutations to take into account. DB2 sliding secondaries are a whole different world again!
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1211
Location: Bamberg, Germany

PostPosted: Sun Oct 29, 2023 4:19 pm
Reply with quote

As Pete said, multiple things are to be considered. I am certain to also not know every of the details he mentioned.

For the TS, the first replies are of interest. I do not think you have advanced means active.
Back to top
View user's profile Send private message
Akil

New User


Joined: 24 Oct 2023
Posts: 22
Location: India

PostPosted: Sat Nov 04, 2023 11:09 pm
Reply with quote

"In this case the dataset has taken 55 extents that in total add up to 5556 cyls. The first extent of the primary just happened to be 265 cyls."

But how did this 55 extents add up to 5556 cyls?

Do you mean to say ,it depends on number of factors that you mentioned ? or is there any calculation?
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Mon Nov 06, 2023 1:19 pm
Reply with quote

Akil wrote:
"In this case the dataset has taken 55 extents that in total add up to 5556 cyls. The first extent of the primary just happened to be 265 cyls."

But how did this 55 extents add up to 5556 cyls?

Do you mean to say ,it depends on number of factors that you mentioned ? or is there any calculation?


Without more detailed information it's impossible to say exactly how the 55 extents added up to 5556cyls. We can't tell if it was multi-volume, or extended format or influenced by Dataclas or anything from the info provided. And yes, of course it depends on several factors as described earlier. You can't 'calculate' it without finding the size of every extent on every volume it's allocated on with something like IEHLIST and adding it up. If you have time to waste on that enjoy! What's important is you've asked the system to allocate an amount of space and it has done what it can to achieve that by various means.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
Search our Forums:

Back to Top