mp_dropmembers.sas File Reference

Drops tables / views (if they exist) without warnings in the log. More...

Go to the source code of this file.

Detailed Description

Useful for dropping tables when you're not sure they exist, or if you are not sure whether they are a dataset or view. Also efficient for dropping multiple tables / views.

Example usage:

proc sql;
create table data1 as select * from sashelp.class;
create view view2 as select * from sashelp.class;
%mp_dropmembers(data1 view2, libref=WORK)

SAS Macros

Parameters
[in]listspace separated list of datasets / views, WITHOUT libref
[in]libref=(WORK) Note - you can only drop from one library at a time
[in]iftrue=(1=1) Conditionally drop tables, eg if &debug=N
Version
9.2
Author
Allan Bowe

Definition in file mp_dropmembers.sas.