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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.