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!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 7 replies
  • 1691 views
  • 0 likes
  • 3 in conversation