BookmarkSubscribeRSS Feed
jcbell
Obsidian | Level 7

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

4 REPLIES 4
ieva
Pyrite | Level 9

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).

art297
Opal | Level 21

Are you looking for the purge statement?  Unfortunately, I think it is only available in SAS/IML

jcbell
Obsidian | Level 7

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. 

jcbell
Obsidian | Level 7

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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 857 views
  • 0 likes
  • 3 in conversation