6

This probably has a really simple answer. How would I go about deleting all the datasets in a library? I did something like

proc datasets library=lib;
   delete _all_;
quit;

but that just tries to delete the dataset called _all_. Do I have to manually list all the datasets in the delete command?

Hong Ooi
  • 56,353
  • 13
  • 134
  • 187

1 Answers1

14

Use the kill option in the proc dataset to delete all files in a library.

proc datasets library=lib kill;
run;
quit;
Laurent de Walick
  • 2,154
  • 14
  • 11