Dear all,
How are you?
Can I please ask what does this note mean after I run the SAS import procedure?
NOTE: A byte order mark in the file "C:\Users\kwong\Documents\RF2015.csv" (for fileref "#LN00643") indicates that the data is encoded in "utf-16le". This encoding will be used to process the file.
How do I resolve it? I'm running SAS9.3 TS Level 1M0 on W32_7PRO platform.
Thank you very much.
I'm a little concerned with the two dbms= options; apart from that, the code looks good. You could try to reduce the guessingrows, as these tend to be very bad for performance (the lookup for correct data types will take longer than the actual import).
If the structure of the csv file will not be subject to changes that your program needs to automatically adapt to, I suggest you take the data step code created by proc import and use that in the future.
Dear all,
and rewrote my SAS code as
filename rf2015 "C:\Users\kwong\Documents\RF2015.csv" encoding="utf-16";
PROC IMPORT OUT= WORK.rf2015
DATAFILE= rf2015
DBMS=CSV dbms=dlm REPLACE;
delimiter='09'x;
GETNAMES=YES;
DATAROW=2;
GUESSINGROWS=2147483647;
RUN;
When I checked the log window, the corresponding note on encoding has gone and the data seems fine.
Can someone please confirm if my code is right?
Thank you very much.
I'm a little concerned with the two dbms= options; apart from that, the code looks good. You could try to reduce the guessingrows, as these tend to be very bad for performance (the lookup for correct data types will take longer than the actual import).
If the structure of the csv file will not be subject to changes that your program needs to automatically adapt to, I suggest you take the data step code created by proc import and use that in the future.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.