PROC RELEASE can be
used with most sequential or partitioned data sets, not just with
a SAS library that contains SAS data sets. However, PROC RELEASE is
not supported for, and cannot be used to release unused space from,
the following types of data sets:
-
-
extended partitioned data sets
(PDSEs)
-
-
multivolume SAS libraries
-
If you delete some members
from a SAS library (using the DATASETS procedure, for example), you
can use the RELEASE procedure to release the unused space at the end
of the last member. You cannot use PROC RELEASE to release embedded
space. That is, you can release only space that follows the “Highest
Used Block,” as indicated by the CONTENTS or DATASETS procedure.
In order to use PROC
RELEASE on a SAS library, the library must be closed. If the library
is open, SAS generates an error message. If you have assigned a libref
to the library and have used some members of that library in your
SAS session, the library is opened. To close it, issue a LIBNAME statement
of the following form for each libref currently assigned to the library:
Then issue a new LIBNAME
statement for the library and immediately run PROC RELEASE. As an
alternative to issuing a second LIBNAME statement, you can simply
specify the library's name (enclosed in quotation marks) as the value
of the DDNAME= option in the PROC RELEASE statement.
In the control language,
you can release unused space by using specifications such as SPACE=(,,RLSE)
in the DD statement (in batch mode), or you can use the RELEASE operand
of the TSO ALLOCATE command. However, releasing unused space with
PROC RELEASE offers several advantages over methods provided by the
operating environment. For example, with PROC RELEASE, the user, not
the operating environment, controls when unused space is released.
This advantage is especially applicable to TSO users.
Another advantage of
PROC RELEASE is that you can use PROC RELEASE options to specify exactly
how many tracks you want to keep or release. There is no danger of
erasing all or part of a data set because PROC RELEASE frees only
unused space. PROC RELEASE returns unused space to the pool of available
space on the disk volume. Once released, the space is still available
for allocation to the data set, provided a secondary space allocation
is given for the data set in the control language or SAS statement,
and provided all free space on the volume is not subsequently allocated
to other data sets.