BookmarkSubscribeRSS Feed
brian_clark
Calcite | Level 5

I have been a Base SAS user for about 5.5 years and am comfortable with about anything in that enviroment; however, we have transitioned over to SAS EG with a SAS server.  I am struggling to get some of the old programs I used to consistently run work in SAS EG.  An example is having a data set (i.e. text file, spreadsheet, SAS data set) on my local drives be able to be imported into SAS EG.

 

This code works in BASE SAS

PROC IMPORT OUT= EOC_ELA

DATAFILE= "X:\StateTest_VendorFiles\OST_ProductionExaminee_20160617071621_EOC_ELA.txt"

DBMS=DLM REPLACE;

DELIMITER='|';

GETNAMES=YES;

DATAROW=2;

RUN;

 

Our SAS servers our running on LINUX so I have tried the following and receiver error 180-322.  I have received that error when I try a CSV file or a delimited file.

 

PROC IMPORT DBMS=csv OUT= EOC_ELA

DATAFILE= "\\pd01\server\StateTest_VendorFiles\OST_ProductionExaminee_20160617071621_EOC_ELA.csv"

REPLACE;

PORT=9621; SERVER=PD01;

RUN;

 

The only files that I have been able to successfully import from a code perspective is with EXCEL spreadsheets.  The code below works:

 

PROC IMPORT DBMS=EXCELCS  OUT=work.test DATAFILE='\\pd01\server\brian.clark\xsz\2017_xyx.xls' REPLACE;

PORT=9621; SERVER=FS01; SHEET='CCP_INVALID_REPORTS'; RUN;

 

Any assistance would be appreciated.

Thanks!

 

1 REPLY 1
SASKiwi
PROC Star

You don't need the SERVER and PORT statements with CSVs. They are only required when you use the SAS PC Files Server which is referenced by your DBMS = EXCELCS option.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1553 views
  • 0 likes
  • 2 in conversation