Usage Note 32042: Deleting observations and reclaiming disk space
When an observation is deleted from a non-compressed SAS data file, the observation is marked for deletion, but not physically removed. The space is not reclaimed by the operating system until the data file is recreated through a DATA Step without a MODIFY statement, or PROC COPY or PROC SORT, which creates the data file.
Because of this, a PROC CONTENTS shows a number of deleted observations, but the number of data pages does not shrink.
With compressed data files, the structure is different. When using a MODIFY statement to remove observations, if the REUSE option is set to NO, the entry for that observation remains in the segment table, but the actual observation's data is returned to the available space pool.
When REUSE=YES, in addition to making the observation's space available, the marker is removed from the segment table as well.
When REUSE=YES, you can delete and add new observations within the same DATA Step and new observations use the space made available by the deleted observations.
Operating System and Release Information
SAS System | Base SAS | OpenVMS VAX | | |
z/OS | | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | | |
Microsoft Windows XP 64-bit Edition | | |
Microsoft® Windows® for x64 | | |
OS/2 | | |
Microsoft Windows 95/98 | | |
Microsoft Windows 2000 Advanced Server | | |
Microsoft Windows 2000 Datacenter Server | | |
Microsoft Windows 2000 Server | | |
Microsoft Windows 2000 Professional | | |
Microsoft Windows NT Workstation | | |
Microsoft Windows Server 2003 Datacenter Edition | | |
Microsoft Windows Server 2003 Enterprise Edition | | |
Microsoft Windows Server 2003 Standard Edition | | |
Microsoft Windows Server 2008 | | |
Microsoft Windows XP Professional | | |
Windows Millennium Edition (Me) | | |
Windows Vista | | |
64-bit Enabled AIX | | |
64-bit Enabled HP-UX | | |
64-bit Enabled Solaris | | |
ABI+ for Intel Architecture | | |
AIX | | |
HP-UX | | |
HP-UX IPF | | |
IRIX | | |
Linux | | |
Linux for x64 | | |
Linux on Itanium | | |
OpenVMS Alpha | | |
OpenVMS on HP Integrity | | |
Solaris | | |
Solaris for x64 | | |
Tru64 UNIX | | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Information about when and how records are deleted from compressed data sets and non-compressed data sets
Type: | Usage Note |
Priority: | |
Topic: | SAS Reference ==> DATA Step
|
Date Modified: | 2011-07-19 10:39:15 |
Date Created: | 2008-05-08 11:41:07 |