Learning SAS? Welcome to the exclusive online community for all SAS learners.

Mac file upload

Reply
New User
Posts: 1

Mac file upload

Hi!

 

I am trying to upload a csv file onto SAS Studio from my mac, and cannot figure out how to get the right file name. Anyone know how to do this on a mac? 

Super Contributor
Posts: 251

Re: Mac file upload

It should be fairly simple. I have my SAS/Studio share area in ~/Documents/SAS/SASUniversity Edition/myfolders/. There is a file test.csv there now. To reference that:

 

filename test '/folders/myfolders/test.csv';

data _null_;
infile test;
input;
put _infile_;
run;

or

data _null_;
infile '/folders/myfolders/test.csv';
input;
put _infile_;
run;

This is assuming that you're using VirtualBox, which sets up the environment with '/folders' as the parent pathname.

Super User
Posts: 10,538

Re: Mac file upload

Note the the csv file name will be case sensitive. So if you file was named 'This is My file.csv' and you reference it in the filename code as 'This is my file.csv' then the name doesn't match and won't be found. Tricky can be spaces in the file name where it gets to be hard to tell one or two spaces. Some of you system file tools may let you copy the text of the name for pasting but the folder location does have to be one that the virtual machine has access too.

Super User
Posts: 17,912

Re: Mac file upload

Depends on what you mean by Upload, can you clarify? 

Ask a Question
Discussion stats
  • 3 replies
  • 264 views
  • 2 likes
  • 4 in conversation