I am cleaning the 'work' library before the start of the program by using the following code. However, I am getting the warning message in the log 'WARNING: No matching members in the directory.'
Can I avoid this or any alternatives where I can delete the existing datasets in the 'work' library before the start of the program? I thought of using it at the end ( but this will not help when the datasets are already there, and it may overwrite my datasets.)
Thank you.
dm 'log;clear;output;clear;odsresults ;clear';
proc datasets lib=work memtype=data kill;
quit;
This should do it
data _null_;
set sashelp.vtable(where=(libname='WORK' and MEMTYPE='DATA')) nobs=obs;
if (obs > 0) then
rc = dosubl('proc datasets lib=work memtype=data kill NOLIST NOWARN;run;quit;');
run;
No luck 😥
This should do it
data _null_;
set sashelp.vtable(where=(libname='WORK' and MEMTYPE='DATA')) nobs=obs;
if (obs > 0) then
rc = dosubl('proc datasets lib=work memtype=data kill NOLIST NOWARN;run;quit;');
run;
Thank you. It is working now.
Use NOLIST option not the NOWARN option.
Try this example:
data x; run;
proc datasets lib=work memtype=data nolist kill;
quit;
proc datasets lib=work memtype=data nolist kill;
quit;
1102 data x; run; NOTE: The data set WORK.X has 1 observations and 0 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 1103 proc datasets lib=work memtype=data nolist kill; NOTE: Deleting WORK.X (memtype=DATA). 1104 quit; NOTE: PROCEDURE DATASETS used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 1105 proc datasets lib=work memtype=data nolist kill; 1106 quit; NOTE: PROCEDURE DATASETS used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
Try option NODSNFERR .
options nodsnferr;
proc datasets lib=work memtype=data kill nolist nodetails;
quit;
Thank you
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.