Desktop productivity for business analysts and programmers

SAG EG Issues with PROC IMPORT

Reply
New Contributor
Posts: 4

SAG EG Issues with PROC IMPORT

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!

 

Super User
Posts: 3,768

Re: SAG EG Issues with PROC IMPORT

Posted in reply to brian_clark

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.

Ask a Question
Discussion stats
  • 1 reply
  • 182 views
  • 0 likes
  • 2 in conversation