Dear community,
by now I have only been working with the original SAS program on a Windows computer. For my thesis I only have the SAS UE on my Macbook air with OSX Mavericks.
This code always worked on my Windows PC, but in SAS Studio I get an error message:
ERROR: Server Name is invalid or missing.
Not sure what to change, please help 🙂 Thank you in advance 🙂
PROC IMPORT OUT= work.DATENSATZ_PMS
DATAFILE= "/folders/myfolders/PMS/Datensatz_PMS.xls"
DBMS=EXCELCS REPLACE;
RANGE="Sheet1$";
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;
PROC IMPORT OUT= work.DATENSATZ_PMS
DATAFILE= "/folders/myfolders/PMS/Datensatz_PMS.xls"
DBMS=EXCEL REPLACE;
RUN;
Try this instead.
PCFILES isn't used with SAS UE.
@marysmith wrote:
Dear community,
by now I have only been working with the original SAS program on a Windows computer. For my thesis I only have the SAS UE on my Macbook air with OSX Mavericks.
This code always worked on my Windows PC, but in SAS Studio I get an error message:
ERROR: Server Name is invalid or missing.Not sure what to change, please help 🙂 Thank you in advance 🙂
PROC IMPORT OUT= work.DATENSATZ_PMS
DATAFILE= "/folders/myfolders/PMS/Datensatz_PMS.xls"
DBMS=EXCELCS REPLACE;
RANGE="Sheet1$";
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;
PROC IMPORT OUT= work.DATENSATZ_PMS
DATAFILE= "/folders/myfolders/PMS/Datensatz_PMS.xls"
DBMS=EXCEL REPLACE;
RUN;
Try this instead.
PCFILES isn't used with SAS UE.
@marysmith wrote:
Dear community,
by now I have only been working with the original SAS program on a Windows computer. For my thesis I only have the SAS UE on my Macbook air with OSX Mavericks.
This code always worked on my Windows PC, but in SAS Studio I get an error message:
ERROR: Server Name is invalid or missing.Not sure what to change, please help 🙂 Thank you in advance 🙂
PROC IMPORT OUT= work.DATENSATZ_PMS
DATAFILE= "/folders/myfolders/PMS/Datensatz_PMS.xls"
DBMS=EXCELCS REPLACE;
RANGE="Sheet1$";
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;
Thank you for your quick respond.
I tried it but still getting an error message:
ERROR: DBMS type EXCEL not valid for import.
Do you know what else I can try or why Excel is not valid for import?
Cheers 🙂
Minor recommendation: don't write code in upcase, it is more difficult to read than using mostly lower-case letters.
@andreas_lds I think that's an example of how SAS task is creating the underlying code.
XLS files are pretty old, over a decade at this point, 2007 introduced XLSX files. Support and working with older files changes over time and because it crosses the 32bit/64bit issues sometimes that needs to be dealt with. Fortunately it's gotten easier!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.