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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 1 reply
  • 1806 views
  • 0 likes
  • 2 in conversation