Hi Team,
I would like to upload CSV file under the folder name Test into the Dropbox. I have been trying the below code to finish my task but it's been unsuccessful.
file dropbox url 'https://www.dropbox.com/'
Email='n*******s@***.com' Pass='**********' prompt;
data _null_;
infile dropbox length=len;
input record $varying200. len;
put record $varying200. len;
if _n_=15 then stop;
run;
proc export data=merge1;
outfile = "\file.csv" replace; run;
Here the SAS code should login with my dropbox credentials and create a folder called TEST and upload the CSV file into it.
It will be helpfull if you can come up with some solution to the problem.
Hi,
Personally I don't use Dropbox (having a distrust in anything online based), so how do you normally upload files? Is it by sending an email - if not I don't see how the file statement would work. You would need to investigate what the command line approach to uploading files to Dropbox is, here for instance:
http://www.dropboxwiki.com/tips-and-tricks/using-the-official-dropbox-command-line-interface-cli
I would also point out that its is unlikely that the use of third party online storage would be inline with any data storage policy you have at your company, mine would expressly forbid such a process. Data should be transported via secure means - such as SFTP. So do be careful about what your doing.
Hi,
Dropbox is not my business case. I have got similar kind of business study where i need to code it in SAS. Dropbox is just an example for my requirement.
Without knowing the actual case its hard to say as each system has its own process.
If you are attempting to write to a Url then use separate FILENAME statements for your source and destination that includes the url with the specific file to read and write.
I don't use Dropbox but I think something like
filename dropin url " https://www.dropbox.com/path/your source file name Email='n*******s@***.com' Pass='**********' prompt ";
filename dropout url " https://www.dropbox.com/path/your output file name Email='n*******s@***.com' Pass='**********' prompt ";
may be close. An entire connections string may need to be inside the quotes to send to the server. You should get a response in the log if the fileref can't be created and so can play around.
Use the dropout fileref instead of explicit file in the Proc export: Outfile= dropout
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.