BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
robertl
Fluorite | Level 6

SAS will not allow me delete the files circled in red.

 

SAS_File_Structure.JPG

 

I try to delete the files by right clicking. and selecting delete.  When I do this, i get the following pop up.

 

SAS_Delete_Button.JPG

 

I select the Delete button and get the following error message.  What am I doing wrong?  I can't seem to delete the files.

SAS_Error_Code.JPG

 

Here's the file structure.

 

SAS_File_Properties.JPG

First time poster to the SAS Communities.  Let's see how this goes.  Any help is appreciated.  Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
JackieJ_SAS
SAS Employee

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.

 

View solution in original post

7 REPLIES 7
JackieJ_SAS
SAS Employee

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.

JackieJ_SAS
SAS Employee

As additional information, compare your last screen shot to this one:

JackieJ_SAS_0-1706717404956.png

The name field in your file properties has several spaces at the beginning, whereas the name in the screen shot above does not.

robertl
Fluorite | Level 6

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.

 

robertl_0-1706717781014.png

 

JackieJ_SAS
SAS Employee

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:

JackieJ_SAS_0-1706718978486.png

 

 

tom_grant
SAS Super FREQ
Also, I would avoid using your sasuser directory to store files - move your files to Files(Home) or create a subfolder under Files(Home).
JackieJ_SAS
SAS Employee

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.

 

robertl
Fluorite | Level 6

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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 683 views
  • 7 likes
  • 3 in conversation