Yes, volumes need to be reorganized/compressed every so often but not as
frequently as PDSs. The reason is the way the disk space is allocated
by MVS.
MVS defines contiguous allocations of dasd space as an extent. When you
code SPACE=(TRK,10) in the JCL, an extent of 10 contiguous tracks is
allocated in the VTOC (Volume Table Of Contents). The VTOC is a
directory to what is stored on the volume and where. The VTOC also
contains a free space chain. When a Volume is created, the VTOC defines
the entire volume (except for the VTOC) as free space.
When your create a new dataset, MVS searches the free space chain
sequentially for an entry with enough space to satisfy your request.
The free space will be reduced and the space allocated for your dataset.
Usually you will have many datasets all of different extent sizes. When
you delete a dataset, its space is put on the free space chain and it
becomes available again.
Now here is where the rub comes in. A free space extent can only be
reused if the new dataset's space request is less than or equal to the
size of the free space. Eventually, enough of these little fragments
will be created. A volume could show only 50% utilization but no room
for datasets because it is so badly fragmented. It is time for a reorg.
PDSs are allocated an extent when created and the contents stay within
that extent. Each time a member is added or replace, the "new" member
is attached to the "end" of the dataset. Members are never really
deleted. They are flagged as deleted. That is how undelete member
programs can find previous versions of a PDS member. Once the PDS is
compressed or copied, the "flagged" members are physically deleted and
other members are moved to occupy that space. It is "kind a sorta" like
the Window recycle bin.
There are several commercial programs for compressing volumes but these
are not available for Turnkey. There is a tool in the file area
(MAPDISK) that maps dataset space and the free space chain. There are
two versions, both are the same except I modifed it print a banner page
for each volume processed.
Hope this answers your question.
Ed
Post by Ron HudsonHi !
OK, I know that PDSs must be compressed sometimes but do volumes need to be
compressed
or maintained? Is there a program that weeds out the space that was taken by
deleted datasets
and moves everything around to create a large pool of free space?
Ron