Help using Base SAS procedures

export to xls on mac problem ??

Reply
New User
Posts: 1

export to xls on mac problem ??

hey guys, hope you can help.    

 

i get the error  File= or Table= is required and must be specified, and i cant figure out what the problem is ?  please help


proc freq data=data4;
tables still*aar/out=histo;
run;


proc export data=histo
OUTFILE="folder/myfolder/ex1.xls"
DBMS=XLS REPLACE;
SHEET="tilstande";
run;

SAS Super FREQ
Posts: 8,740

Re: export to xls on mac problem ??

Hi: Please refer to some of the previous posts about using SAS University Edition and the way you reference your shared folder. Typically, you are instructed to set up a subdirectory called "myfolders" under your root, SASUniversity Edition shared folder. You show the string "/myfolder" in your code and SAS University Edition REALLY, REALLY, wants that folder to be named "/myfolders" -- so whether you are on a Mac or a PC is irrelevant -- what did you name your shared folder??? "myfolder" or "myfolders"
1) if you named it "myfolder" go back to your Mac OS directory structure and rename it to "myfolders" (with an s on the end) and then make sure that your virtualization software has the correct path name defined as the shared folder location or
2) if your Mac drive shows that you created /myfolders and you shared it as that, then change your code to add the s

Bottom line -- when I do an export, using SAS University Edition, I need to use:
OUTFILE="/folders/myfolders/mywb.xls"

Please note the leading slash in front of the path...and note that I have /folders (there is an s on the end of the high-level path, too).

Here are some previous postings:
https://communities.sas.com/t5/SAS-Analytics-U/Export-dataset-from-SAS-university-edition-to-excel/m... (this one is the most relevant and shows many PROC EXPORT examples)
and...
https://communities.sas.com/t5/Base-SAS-Programming/How-do-I-reference-SAS-data-from-within-a-SAS-pr...

https://communities.sas.com/t5/SAS-Analytics-U/Library-does-not-exist-despite-using-Unix-forward-sla...
http://support.sas.com/software/products/university-edition/faq/trouble_invalid_path_error.htm

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 233 views
  • 0 likes
  • 2 in conversation