DATA Step, Macro, Functions and more

Deteting SAS dataset: message file does not exist

Posts: 58

Deteting SAS dataset: message file does not exist


I'm trying to delete a SAS dataset from my explorer window but I get the message. The file LIBNAME.DATASETNAME.DATA does not exist.

The file really does not exsist in my phisical directory (may be it has been deleted in the past) but he dataset still continue to be showed in my explorer under the library LIBNAME.

I've tried to create a file with name DATASETNAME as copy of another dataset and try to delete it from explorer but I still get the same message.

I've tried to save a dataset with the same name (DATASETNAME) and then I've treid to delete it from my explorer but I still get the same message and the dataset is still present in the explorer.

Do there is a way to remove the dataset icon from my explorer?

Many thanks.

Super User
Super User
Posts: 8,116

Deteting SAS dataset: message file does not exist

It might be that you libname is pointing to multiple directories and it is confusing explorer window?  Check the definition of the LIBNAME you are using.   For example if your libname is DATA1 then you could submit this statement and see in the log a lot of information about the libname.

libname data1 list;

Are you sure you are looking at the list of members for the library that you think you are looking at?  Try opening a new window using the DIR command.  Again if your actual libname is DATA1 use the command DIR DATA1 from the command prompt.  Or submit the line

dm 'dir data1';

Are you using Unix?   Filenames on unix are case sensitve. SAS dataset file names should be in all lowercase letters.  Perhaps the Explorer window doesn't know this and is listing a file that has an invalid name.  For example if your dataset is DATA1.FRED the file should be named fred.sas7bdat.  If it is name instead Fred.sas7bdat then SAS will not see it.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation