BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
marysmith
Calcite | Level 5

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; 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
 

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; 


 

View solution in original post

7 REPLIES 7
Reeza
Super User
 

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; 


 

marysmith
Calcite | Level 5

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 🙂 

marysmith
Calcite | Level 5
I tried this! it worked Thank you!
PROC IMPORT OUT= work.DATENSATZ_PMS
DATAFILE= "/folders/myfolders/PMS/Datensatz_PMS.xls"
DBMS=xls REPLACE;
RUN;

andreas_lds
Jade | Level 19

Minor recommendation: don't write code in upcase, it is more difficult to read than using mostly lower-case letters.

marysmith
Calcite | Level 5
thank you!
Reeza
Super User

@andreas_lds I think that's an example of how SAS task is creating the underlying code.

Reeza
Super User

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!