SAS will not allow me delete the files circled in red.
I try to delete the files by right clicking. and selecting delete. When I do this, i get the following pop up.
I select the Delete button and get the following error message. What am I doing wrong? I can't seem to delete the files.
Here's the file structure.
First time poster to the SAS Communities. Let's see how this goes. Any help is appreciated. Thank you.
When file names on ODA have unexpected characters, it may not be possible to even rename the file. One way to delete these datasets without ever referencing the dataset name is to delete all the datasets in the same folder using proc datasets.
Try this code:
libname mylib "~/MyFolder";
proc datasets library=mylib kill;
run; quit;
The kill
option deletes all datasets in my library mylib.
You can replace "~/MyFolder"
with the appropriate folder path. To find the folder path, right click on the folder name, select Properties from the menu, then copy the Location field.
Hi, I think the issue is that you have spaces at the beginning of your file name. Trying renaming each file to remove the spaces at the beginning. To rename the file, you can right click on the file, then select "Rename". SAS OnDemand for Academics is a Linux-based system, so requires Linux based conventions for file naming. I do not know for sure, but I think Linux disallows leading spaces in file names.
As additional information, compare your last screen shot to this one:
The name field in your file properties has several spaces at the beginning, whereas the name in the screen shot above does not.
I right click the file, then select RENAME. I eliminate all of the spaces at the front of the file name, and get the following error message.
Hi Jackie, It's Paul Newsom. I'm working with a colleague, Robert Leach.
Hey Paul! 🙂
My next suggestion is to try renaming the file to something very simple and short. For example- temp.sas7bdat. Avoid any spaces or capital letters in the name.
Also, make sure you refresh your file folders from time to time. You can do that by using the two arrows icon on the far right in the top menu:
When file names on ODA have unexpected characters, it may not be possible to even rename the file. One way to delete these datasets without ever referencing the dataset name is to delete all the datasets in the same folder using proc datasets.
Try this code:
libname mylib "~/MyFolder";
proc datasets library=mylib kill;
run; quit;
The kill
option deletes all datasets in my library mylib.
You can replace "~/MyFolder"
with the appropriate folder path. To find the folder path, right click on the folder name, select Properties from the menu, then copy the Location field.
Jackie,
Paul and I really appreciate your looking into how to delete what seemed to be an undeletable file by using the "kill" feature you suggested. Again, many thanks for responding so quickly!
Robert
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Ready to level-up your skills? Choose your own adventure.