Prev: histogram
Next: plot from proc Freq output
From: creaystone on 18 Jun 2010 11:26 Hi, I have a large csv file. But each record is quoted by ", for example, "name1, address1, city1, state1, zip1,,,,,,,,,,,,," "name2, address2, city2, state2, zip2,,,,,,,,,,,,," I use file import and sas treat all the string as one single variable. Since the file has more than 200K records, I cannot use excel to process the file. How can I remove the " or is there a way I can manipulate the data input using SAS code. Thanks,
From: smileguy on 18 Jun 2010 12:33 you can manipulate the _infile_ and remove the quotes, then you can read variables in as if it is a normal CSV file. data test; infile 'd:\test.csv' dsd; input @; _infile_=dequote(_infile_); put _infile_; input (name address city state zip)($); run; On Jun 18, 10:26 am, creaystone <x_li...(a)yahoo.com> wrote: > Hi, > > I have a large csv file. But each record is quoted by ", for > example, > "name1, address1, city1, state1, zip1,,,,,,,,,,,,," > "name2, address2, city2, state2, zip2,,,,,,,,,,,,," > > I use file import and sas treat all the string as one single > variable. Since the file has more than 200K records, I cannot use > excel to process the file. How can I remove the " or is there a way I > can manipulate the data input using SAS code. > > Thanks,
|
Pages: 1 Prev: histogram Next: plot from proc Freq output |