You are on page 1of 3

9/24/2018 Space ABENDs – SB37, D37, E37 - Mainframes 360

Mainframes 360
The one stop destination for System Z professionals
Home Learn Resources Hercules and MVS Miscallaneous
Hangouts The Closet
BLOG POST

What are those extents?


One of the major tasks of the z/OS is to
allocate space for les. A simple mechanism
for doing this is contigous allocation. In this
scheme, a contiguous section of the disk is
allocated for a le. This method achieves
optimal performance for the application
reading/writing the le. However, contiguous
allocation scheme has some cons : THE SHELF

1. The OS must know, how much space will


be required for the le prior to creating the
le. On the z/OS, you must specify explicitly,
the amount of space needed through the
SPACE parameter.
To many people
2. Because les are being continually created who are thrown to
work at a
or deleted, over a period of time, free mainframe
computer on their
space(holes) is scattered across the disk in rst job, they feel

small chunks.Fragmentation occurs. A single lost. Mainframe


people seem to
large contiguous section may not be speak a completely
di erent language
available to satisfy the space request. and that doesn't
make life easy.
What's more, the
books and
To resolve these two problems, the z/OS will manuals are
commonly use extent allocation - a scheme incredibly hard to
comprehend.
in which chunks of space are allocated to a
"What on earth is a
le, as and when the program that is writing Mainframe?" is an
the le needs them. A system that uses absolute
beginner's guide to
extent allocation, needs to know where all of mainframe
computers. We'll

http://www.mainframes360.com/2009/07/space-abends-sb37-d37-e37.html 1/3
9/24/2018 Space ABENDs – SB37, D37, E37 - Mainframes 360

introduce you to
the extents of a le are located. The z/OS the hardware and
uses a dictionary approach, a system in peripherals. We'll
talk about the
which a table has the information about operating system,
the software
each dataset. The VTOC(Volume table of installed on a
mainframe. We'll
contents) holds a row for every le on the also talk about the

disk. Every row referred as le control block di erent people


who work on a
has an array of pointers to extents. To mainframe. In a
nutshell, we'll de-
further improve the performance of the mystify the
mainframe.
VTOC, there's also a VTOC index.
Readers based in
India, can buy the
e-book for Rs. 50
only or the print
book. International
readers based in
the US and other
countries can click
here to purchase
the e-book.

Space Allocation on z/OS


The SPACE parameter speci es the primary
and secondary allocation. A space request
like (CYL,(100,100)) means that z/OS would
try to allocate 100 cylinders of primary
space. The secondary space is the over ow
size. That is if the dataset becomes full, z/OS
routines extend the dataset by another 100
cylinders of secondary space.

For non-VSAM dataset, z/OS allows upto 16


extents of a le per disk volume.
Theoretically, you can therefore have a le
size of 1 primary extent and upto 15
secondary extents. For a space request like
(CYL,(100,100)), this translates to a maximum
size of 100 cylinders + 15 x 100 cylinders =

http://www.mainframes360.com/2009/07/space-abends-sb37-d37-e37.html 2/3
9/24/2018 Space ABENDs – SB37, D37, E37 - Mainframes 360

1600 cylinders of space. In practice, z/OS


may not nd a large contiguous section of
the disk to ful ll a primary request. By
default, z/OS can satisfy a primary request by
breaking it up in upto 5 extents. The bottom-
line is, that a primary request can be ful lled
by anything from 1 to 5 extents. Remember,
that each extents contributes to the total of
the 16 allowed. So, if the full 5 extents are
used for the primary allocation, you are left
with just 11 for the secondary.

Space abends
As a programmer, you may run into out-of-
space errors on creating new datasets. The
system abend code SB37 occurs, when
there's not enough space or no more extents
available on the current volume. The abend
code SD37 is raised when you don't specify a
secondary allocation. Another abend is SE37,
which occurs when there are no more
volumes available.

References:

Dataset control block(DSCB) types

http://www.mainframes360.com/2009/07/space-abends-sb37-d37-e37.html 3/3

You might also like