BookmarkSubscribeRSS Feed
Shazzy
Calcite | Level 5

Help! I'm an advanced and experienced SAS user but this is my first time using SAS Enterprise Guide and through a remote SAS environment which might create complication.

 

I can import a csv file but have problem importing an xlsx file:

Successful:

%let Path_i1="\\awnjpsas02\Corporate-Asia\Production\SG\inputs\sasinputs.csv";

proc import datafile= &Path_i1 out=lob dbms=csv replace; GETNAMES=YES;

 

Failed:

%let Path_i1="\\awnjpsas02\Corporate-Asia\Production\SG\inputs\sasinputs.xlsx";

proc import datafile= &Path_i1 out=lob dbms=excel replace; sheet="lob";

 

Both codes work in my Base SAS. Are there any differences in coding between Base SAS and SAS Enterprise Guide?

 

Thanks a million. Smiley Happy

7 REPLIES 7
LinusH
Tourmaline | Level 20

Do you get an error message?

My first guess would be that you don't have a license for SAS/ACCESS to PC FIle Formats on your server.

Data never sleeps
Reeza
Super User
Or 64bit/32bit incompatibility. Do any of the different DBMS options work - Excelcs or PCFILES?
ChrisHemedinger
Community Manager

As you're now using SAS on a remote system, perhaps with a 64-bit version of SAS, @Reeza might be correct.  You might be able to use DBMS=XLSX with Excel data now -- that works well in SAS 9.4, and it insulates you from bit-architecture issues.

 

You might also find this paper helpful:

 

Feeling Anxious about Transitioning from Desktop to Server?

 

Chris

 

 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
Shazzy
Calcite | Level 5

Hi @Reeza@ChrisHemedinger@LinusH

 

These are the error messages I received running on different options. Is there any other solution to the 64-bit/32-bit compatibility?

 

%let Path_i1="\\awnjpsas02\Corporate-Asia\Production\SG\inputs\sasinputs.xlsx";
proc import datafile=&Path_i1 	out=lob 		dbms=excel replace; sheet="lob";
ERROR: Failed to connect to the Server: .
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):

%let Path_i1="\\awnjpsas02\Corporate-Asia\Production\SG\inputs\sasinputs.xlsx";
proc import datafile=&Path_i1 	out=lob 		dbms=excelcs replace; sheet="lob";
ERROR: Failed to connect to the Server: .
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):

%let Path_i1="\\awnjpsas02\Corporate-Asia\Production\SG\inputs\sasinputs.xlsx";
proc import datafile=&Path_i1 	out=lob 		dbms=pcfiles replace; sheet="lob";
ERROR: DBMS type PCFILES not valid for import.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):

proc import out=lob 	datafile="\\awnjpsas02\Corporate-Asia\Production\SG\inputs\sasinputs.xlsx" 	dbms=excel  replace; sheet='lob';
ERROR: Connect: Class not registered
ERROR: Error in the LIBNAME statement.
Connection Failed.  See log for details.
NOTE: The SAS System stopped processing this step because of errors.

 

MichelleHomes
Meteorite | Level 14

@ChrisHemedinger wrote a blog post about "64 bit gotchas" you may find useful at http://blogs.sas.com/content/sasdummy/2012/05/01/64-bit-gotchas/

 

Also this blog post - http://blogs.sas.com/content/sasdummy/2012/02/11/export-excel-methods/

 

Kind Regards,

Michelle

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
ChrisHemedinger
Community Manager

Did you try DBMS=XLSX? That option was added in a later 9.3 release, and works well in SAS 9.4.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
SASKiwi
PROC Star

I suggest you confirm that your EG remote SAS server has SAS/ACCESS for PC FILES installed and licensed first. Without this importing Excel will not work. In the EG server list you can select Properties on SASApp, select Software then SAS Server Products.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 7062 views
  • 1 like
  • 6 in conversation