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.
Any ideas?
Thanks,
john
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).
Are you looking for the purge statement? Unfortunately, I think it is only available in SAS/IML
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.
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.....
Thanks everyone,
john
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.