Return to Snippet

Revision: 22952
at January 26, 2010 14:22 by sastechies


Initial Code
%macro CleanupWORK(membertype);
/***
ACCESS - access descriptor files (created by SAS/ACCESS software)
ALL - all member types
CATALOG- SAS catalogs
DATA - SAS data files
FDB - financial database
MDDB - multidimensional database
PROGRAM - stored compiled SAS programs
VIEW - SAS views
****/ 


%let validvals=ACCESS ALL CATALOG DATA FDB MDDB PROGRAM VIEW;
%if %index(&validvals,%upcase(&membertype)) gt 0 %then 
  %do;
      proc datasets lib=WORK kill nolist memtype=%upcase(&membertype); 
      quit;
   %end;
%mend;

/* Want to delete all Work Datasets*/
%CleanupWORK(data);
%CleanupWORK(CATALOG);

Initial URL
http://sastechies.blogspot.com/2009/12/sas-macro-to-clean-up-work-directory.html

Initial Description

                                

Initial Title
SAS Macro to Cleanup your WORK directory

Initial Tags

                                

Initial Language
SAS