Hello All,
I am doing a proc export step to get the csv format file from SAS.
%macro export_mkt(mktname, outf);
PROC EXPORT DATA= LIB.&mktname.
OUTFILE= "&mydrv.\Projects\Neuro\VInsight_Data\Monthly\&outf._monthly.csv"
DBMS=DLM REPLACE;
DELIMITER=',';
PUTNAMES=YES;
RUN;
%mend;
When the csv file is uploaded to Salesforce.com it is rejecting the file WITH AN ERROR SAYING ,
Error:Invalid utf8 character string: 'The Home Depot'
Error:Invalid utf8 character string: 'St.'
I witnessed in the Csv files that there were blanks in between and after the values. Do I have to compress the variable giving the above mentioned errors? How to solve this problem ?
Seems to be possible, see https://communities.sas.com/t5/SAS-Procedures/Encoding-in-proc-export/td-p/191519 for details.
The blank should not be a problem, but have you checked the encoding of the file created by proc export. Is it in utf-8?
Hello Andreas,
It is not in the UTF-8 format. As of now I just exported the csv files to Ultraedit and again saved them as UTF-8. If there is a way I can incorporate UTF-8 format while doing a proc export in the sas code itself ?
Thanks
Seems to be possible, see https://communities.sas.com/t5/SAS-Procedures/Encoding-in-proc-export/td-p/191519 for details.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.