07-13-2011 06:45 AM
I'm searching for a efficient way to remove deleted obs from a SAS table. I know I can write a table on itself or copy the table to remove the deleted observations, but my tables in question are rather large. I'm curious if there are any other techniques available to avoid having to write out all of the obs. I thought proc datasets might clean up the table, but I don't see anything in the documentation that performs this action.
07-13-2011 07:58 AM
What do you mean by "deleted observations"?
I think you will need to open and process data at least once anyway to define which observations you want to delete, right? So you could try to do this in the most efficient way (for example, using WHERE statement).
07-14-2011 07:47 AM
Yes - Something like a purge. I have large datasets that are accumulating deleted observations (25M). I can always overwrite the table, but I wanted to see if anyone had a better suggestion (more efficient). I suppose I can take a look at IML.
07-14-2011 08:04 AM
For anyone else with a similar issue -
IML does work - but isn't as efficient as using a data step and over-writing the table.
A purge statement in proc datasets seems like a sensible option to add.....