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 (January 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 19 Jan 2010 16:00:36 +0000
Reply-To:   goladin@gmail.com
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Murphy Choy <goladin@GMAIL.COM>
Subject:   Re: Unable to read Unicode file into SAS file - able to do after using 'convert into DOS'. Please help
Comments:   To: Cherish K <c4cherish@gmail.com>
Content-Type:   text/plain

Hi,

Have you using utf-8 encoding? It works for some unicode files.

------Original Message------ From: Cherish K Sender: SAS(r) Discussion To: SAS-L@LISTSERV.UGA.EDU ReplyTo: Cherish K Subject: Unable to read Unicode file into SAS file - able to do after using 'convert into DOS'. Please help Sent: Jan 19, 2010 11:36 PM

From MS SQL, I extracted a huge file of size 2.5GB. But the file was unicode encoded. So the usual import function wasn't working.

From the archives I found a code written by DATA_NULL which says to use filename and encoding option;

Below is the code given by data null

filename chr "File_LOCATION\FILENAME.csv" encoding = Unicode;

proc import datafile = chr out = chk DATAFILE=chr DBMS=DLM REPLACE; DELIMITER = '|'; GETNAMES=YES; DATAROW=2; RUN;

what was happening is initial few columns were getting imported properly, i.e. out of 97 columns 25 were imported properly, 5-7 partial import, and the rest blanks.

When i opened the file in textpad, i could see that all the fields are populated. What might be the problem?

I used convert to DOS option in textpad and then converted using usual import option and it was working well i.e. all columns are getting imported properly.

But to do this I had to split the file into smaller ones so that I can open it in textpad and then use convert to DOS option.

Is there a way in SAS where I can directly convert the unicode csv file to SAS (reading all the columns?)

Regards, Cherish

Sent from my BlackBerry Wireless Handheld

-- Regards, Murphy Choy

Certified Advanced Programmer for SAS V9 Certified Basic Programmer for SAS V9


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