DATA Step, Macro, Functions and more

CSV File Import

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 18
Accepted Solution

CSV File Import

I am trying to import an CSV into SAS university edition. I am using code as mentioned below. 

 

/** FOR CSV Files uploaded from Windows **/

FILENAME CSV "/folders/myfolders/project/Full (6).csv" TERMSTR=CRLF;

/** Import the CSV file. **/

PROC IMPORT DATAFILE=CSV
OUT=orion.MYCSV
DBMS=CSV
REPLACE
RUN;


/** Unassign the file reference. **/

FILENAME CSV;

 

However the log is showing error I have atteched a screen shot of the log 


1.png

Accepted Solutions
Solution
‎03-14-2017 07:39 PM
PROC Star
Posts: 7,474

Re: CSV File Import

[ Edited ]
Posted in reply to ayushupadhyay22

Like @KurtBremser said rather than the line that says REPLACE it should say REPLACE;

 

Art, CEO, AnalystFinder.com

 

View solution in original post


All Replies
Super User
Posts: 7,782

Re: CSV File Import

Posted in reply to ayushupadhyay22

The closing semicolon of the proc import statement is missing.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Solution
‎03-14-2017 07:39 PM
PROC Star
Posts: 7,474

Re: CSV File Import

[ Edited ]
Posted in reply to ayushupadhyay22

Like @KurtBremser said rather than the line that says REPLACE it should say REPLACE;

 

Art, CEO, AnalystFinder.com

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 158 views
  • 0 likes
  • 3 in conversation