BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
purveshrana
Fluorite | Level 6

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 ?

1 ACCEPTED SOLUTION
3 REPLIES 3
andreas_lds
Jade | Level 19

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?

purveshrana
Fluorite | Level 6

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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 4266 views
  • 0 likes
  • 2 in conversation