12-24-2013 12:38 AM
I've written 2 patterns of code.(difference is the "*" before "getnames=no")
The result for code 1 is all value within the CSV is "< Value not readable>"
The result for code 2 is the correct imports except the row 1 value and the column names are var1,etc.
Can anyone give a hand?
Thanks in advance.
12-24-2013 01:03 AM
Thanks for your attention.
For better understanding I attached the 2 outputs of result for your reference.
The first is the output of code 1,the second is the output of code 2.
12-24-2013 02:39 AM
Attached is some records from CSV file,which is "saved as" from a excel file.
|上海||GUB||YICK POON MING||5.1||现有 VIP||2013/6/1||CN06131|
|上海||GUB||WONG CHUI YIN||5.1208||现有 VIP||###||2013/6/1||CNHA07345|
12-24-2013 06:47 AM
I'd like to suggest you to read the csv file in the datastep infile and input. In my experience, I have encountered various issues whilst using Proc import. Presumably, datastep is perhaps more efficient too. Or, there is a possibility of saving your csv file as an xls file and use the import wizard. However, I would assume the dataset is much too large to fit in the xls file.
Datastep option is perhaps better in my opinion.
12-24-2013 09:26 AM
I don't know what additional problems you might confront but, the sample you posted, appears to be tab delimited .. not csv.
Have you tried it with DBMS-tab ?
12-26-2013 06:59 AM
I am seeing the special Eastern language characters once being indicated to be solved by a DBCS approach.
Web/Html and Microsoft office are using utf-8 these days. Most systems however are using latin-1 (western) single byte.
This is what Tom already mentioned as being an encoding problem. You cannot read all chars of utf-8 in a latin-1 only system.
When your SAS system is running latin-1 change it to run utf-8 (different menu lay-out) and import again.
Be aware of the bom (byte order mark) can be added to files editted by a SAS utf-8 system possible making them unusable for programs not aware of utf-8 encoding.
12-26-2013 12:03 PM
If your original data is stored in a XLSX file then you can use the new %xlsx2sas macro to transform it to SAS data set without going through CSV format.
The %xlsx2sas macro supports NLS encoding (UTF-8).
Demo download & free trial at: www.bixforsas.com
01-28-2014 07:08 PM
See if the following works.