Page 1 of 1

jcl - what does exactly extents mean?

PostPosted: Sun Aug 08, 2010 9:30 pm
by naresh.galipalli
hi.....everyone
i am new to this forum and also new to mainframes
i want to know about extents.
for a non-vsam dataset it is 16 and for vsam it is 123
what does exactly extents mean? how it will allocated the memory?
can anyone tell me in detail plz?

Re: jcl

PostPosted: Sun Aug 08, 2010 9:48 pm
by Robert Sample
When a file is allocated under z/OS, the system goes out and finds a disk pack that matches the specifications you provided. The system then looks for free space large enough to allocate the file. If it finds enough free space, the file is allocated on the disk drive and takes up one extent. If there is not enough free space to allocate the file in one extent, the system can use up to 5 free space areas that total enough space to allocate the file -- so it would be allocated in up to 5 extents (and yes these 5 count against the 16 total limit). If you start writing to the file and it runs out of space, the system will then attempt to allocate a secondary extent using the parameters you provided when you defined the file.

So basically an extent has absolutely nothing to do with memory; an extent is an area on a disk pack that contains all or part of a file. Mainframes work very differently than PCs do -- for a PC the next extent pointer is part of the actual file, whereas the mainframe maintains a table of where the extents are located on the disk and therefore the table can hold 16 entries (123 for VSAM) -- once you fill it up, your file cannot allocate any more space on that disk no matter how much free space there is on the disk.

If you want more details, you'll need to research the z/OS catalog and the VTOC (and VVDS for VSAM) -- however, these are advanced topics and there normally would be little reason for you to need more details.

Re: jcl

PostPosted: Sun Aug 08, 2010 11:13 pm
by naresh.galipalli
Thank you very much....Mr.Robert Sample.
your answer is very helpful to me.