PROC Delete

From sasCommunity
Jump to: navigation, search

Proc Delete is faster than either Datasets or SQL.

PROC Delete data = Libref.DataName;
 
PROC SQL; drop table Libref.DataName;
          quit;
 
PROC Datasets library = Libref;
              delete    DataName;
run;
 
DATA _Null_;
length dd $8;
rc = filename(dd,cats(pathname('Libref'),'\DataName.sas7bdat'));
rc = fdelete(dd);
put _all_;
run;

Previously.Old.News.Note: Proc Delete is/was officially deprecated; you could not get help from Tech Support about it, prior to 2013.

References

--macro maven == the radical programmer 11:58, 5 January 2009 (EST)