Dear all,
I have txt file, delimited by '¬' and with spanish accents like 'á', 'é' or 'ñ'
Everytime i've tried to encode as wlatin1, it doesn't worked due to the delimiter type but using UTF-8, is well-recognized the fields but all the accents appear in the same and weird form "�".
Code:
__________________________________________________________________________________________________
options compress=yes;
LIBNAME RETAIL 'G:\SASData\Riesgos\Herramientas y Metodologías\Cosechas';
FILENAME MR "G:\SASData\RCI_Compartida\Riesgos\Mina de Riesgos\RCI_MR_20191231.txt"
ENCODING='UTF-8'
LRECL=32767;
PROC IMPORT
DATAFILE= MR
OUT=WORK.MINARIESGOS
DBMS=DLM
REPLACE;
DELIMITER="¬";
GETNAMES=YES;
RUN;
__________________________________________________________________________________________________
I looked for some solutions in several posts without success. Also, i don't have admin rights to modify SAS parameters.
Appreciate any kind of help in this topic.
Thank you. Luisa.
Your sas-session uses utf-8?
Strange. The problem could be the encoding of the file. If it is in utf-8-bom then importing it should not be a problem, sas should even recognize the encoding automatically.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.