Chapter Contents |
Previous |
Next |
RELEASE |
OS/390 specifics: | all |
Syntax | |
Details | |
PROC RELEASE Statement | |
Usage Notes | |
Output | |
Example | |
See Also |
Syntax |
PROC RELEASE DDNAME=file-specification <options>; |
Details |
PROC RELEASE can be used with most sequential or partitioned data sets, not just with a SAS data library that contains SAS data sets. However, it cannot be used to release unused space from:
If you delete some members from a SAS data 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 RELEASE to release embedded space. That is, you can release only unused space that follows the highest track or block that is currently in use, as indicated by the CONTENTS or DATASETS procedure.
In order to use PROC RELEASE on a SAS data library, the data library must be closed. If the library is open, SAS generates an error message. If you have assigned a libref to the data library and have used some members of that library in your SAS session, the library will be open. To close it, issue a LIBNAME statement of the following form:
LIBNAME libref CLEAR; |
Then issue a new LIBNAME statement for the data library and immediately run PROC RELEASE. As an alternative to issuing a second LIBNAME statement, you can simply specify the data library's name (enclosed in quotes) as the value of the DDNAME= option in the PROC RELEASE statement, instead of using a libref.
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.
PROC RELEASE Statement |
PROC RELEASE DDNAME=file-specification <options>; |
proc release ddname=survey total=10;
The procedure calculates the amount of space to release as follows:
amount of space allocated- (value of TOTAL= option) = amount of unused space released |
If the value that you specify is smaller than the amount of used space in the data set, then SAS releases only the unused space at the end of the data set.
amount of space allocated- (used space + value of UNUSED= option) = amount of unused space released |
If the value that you specify is greater than the amount of unused space at the end of the data set, then no space is released at the end of the data set.
If you do not specify one of these options in the PROC RELEASE statement, then all unused space at the end of the data set is released.
Use the following option to specify the unit boundary on which the data set should end:
After the total amount of space to be retained is calculated, this amount is rounded up to the next unit boundary. Any remaining space is then released. Remember that the total amount of space will include the space that is actually used and may also include unused space that was requested with other options. BOUNDARY=type then will increase the amount of unused space that is retained in the data set by the portion of the unit that is needed in order to reach (or round up to) the next boundary. TYPE can be one of the following:
//DD2 DD DISP=OLD,DSN=MY.DATA, // SPACE=(CYL,2)
Usage Notes |
If the messages in the SAS log indicate that no space was released from the data set, check to see whether the data set is allocated to another job or to another user. When PROC RELEASE is invoked, the operating environment's disk space management function (DADSM) must be able to obtain exclusive control of the data set. If it cannot, then no indication that DADSM does not have control is passed to the SAS System, no space is released from the data set, and no error message is issued by the SAS System.
Output |
PROC RELEASE writes the following information to the SAS log:
Example |
filename thisfile 'my.pgm.lib'; proc release ddname=thisfile extents; run;
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.