LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2009, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 12 Nov 2009 13:09:14 -0800
Reply-To:   "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Subject:   Re: Reading CSV into SAS, but delimiter comma is part of data
In-Reply-To:   <0c61b49a-fba9-430d-88a4-870a8de9229b@u36g2000prn.googlegroups.com>
Content-Type:   text/plain; charset="us-ascii"

Attempt to read four variables. f the fourth is null, then you have the three values you want. If the fourth contains text, concatenate the second, a comma, and the third and you will have the tree values you need.

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of sasuser Sent: Wednesday, November 11, 2009 10:34 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Reading CSV into SAS, but delimiter comma is part of data

Hi all -

I need to read an external CSV file which is comma delimited into SAS. However, there is one field contains comma without quotation mark. How can I read such data into SAS?

Example:

ID, Location, Income

1,New York, 30000 2,New York, NY, 40000 3,Austin, 3000 4,Lansin, 38999

What I need is the SAS dataset contains 3 variables (ID, Location, Income), but because the second row has extra comma, it created the fourth variable (var4). How can I make it correct?


Back to: Top of message | Previous page | Main SAS-L page