DATA Step, Macro, Functions and more

Reading CSV file, Please Help. Thanks

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 96
Accepted Solution

Reading CSV file, Please Help. Thanks

Hi ,

Hi Please find attached the SAS Code

Many Thanks

Alice

Attachment

Accepted Solutions
Solution
‎03-19-2013 11:19 AM
Super User
Super User
Posts: 6,499

Re: Reading CSV file, Please Help. Thanks

Usually an indication that your text file has end of line characters embedded in the value of one of the variables.  Your particular example looks like someone put a linefeed or carriage return into the value of an address variable.

You could try using the TERMSTR=CRLF option.  If the file was created on PC such that each line ends with carriage return and line feed characters ('0D'x and '0A'x) then any single CR or LF characters in the middle of the line will not cause SAS to treat it as a new line.

Also make sure you are using TRUNCOVER option.

View solution in original post


All Replies
Super Contributor
Posts: 578

Re: Reading CSV file, Please Help. Thanks

Can you post your data step code?

Solution
‎03-19-2013 11:19 AM
Super User
Super User
Posts: 6,499

Re: Reading CSV file, Please Help. Thanks

Usually an indication that your text file has end of line characters embedded in the value of one of the variables.  Your particular example looks like someone put a linefeed or carriage return into the value of an address variable.

You could try using the TERMSTR=CRLF option.  If the file was created on PC such that each line ends with carriage return and line feed characters ('0D'x and '0A'x) then any single CR or LF characters in the middle of the line will not cause SAS to treat it as a new line.

Also make sure you are using TRUNCOVER option.

Frequent Contributor
Posts: 96

Re: Reading CSV file, Please Help. Thanks

Thank You...I will try TERMSTR=CRLF option

Frequent Contributor
Posts: 96

Re: Reading CSV file, Please Help. Thanks

Many Thanks Tom..It works perfectly Smiley Happy

☑ This topic is SOLVED.

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

Discussion stats
  • 4 replies
  • 197 views
  • 0 likes
  • 3 in conversation