Deleting All Files in a SAS Library
To delete all files in a SAS library
at one time, use the KILL option in the PROC DATASETS statement.
CAUTION:
The KILL
option deletes all members of the library immediately after the statement
is submitted.
You are not asked to
verify the Delete operation, so make sure that you intend to delete
the files before submitting the program.
For example, the following
program deletes all data sets in the library WEATHER and stops the
DATASETS procedure:
proc datasets library=weather kill
;
run;
quit;
The following output
displays the SAS log:
Log 39.11 Deleting All Members of the Library WEATHER
174 proc datasets library=weather kill; NOTE: Deleting WEATHER.BASETEMP (memtype=CATALOG). NOTE: Deleting WEATHER.HIGHTEMP ...
Get Step-by-Step Programming with Base SAS 9.4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.