BookmarkSubscribeRSS Feed
gyambqt
Obsidian | Level 7

Hello Experts,

 

I am loading a single record with (special character embedded) to Greenplum using the code:

 

 

LIBNAME test GREENPLM    PRESERVE_COL_NAMES=NO  PRESERVE_TAB_NAMES=NO  DATABASE=xxx SERVER="xxx"  SCHEMA=xxx  AUTHDOMAIN="xxx" ;

 

data table;
test='aébcabcabc';
run;
 
proc append base = test.test (BULKLOAD=YES   BL_PROTOCOL= "gpfdist"  BL_HOST = "&BL_HOST" BL_DELETE_DATAFILE=NO BL_PORT = &BL_PORT )
      data = table  force ;
 run;
 
 
and I hit the error:
 
ERROR: [SAS][ODBC Greenplum Wire Protocol driver][Greenplum]ERROR: invalid byte sequence for encoding "UTF8": 0xe97f00  (seg20
       slice1 192.168.99.26:40004 pid=303354)
 
 
the underlying dat file generated contains:
 
aé    abcabc
 
if directly copy and paste from dat file you get:
aé
 
if open this dat file from Linux then you will have 
aé^@^@abcabc
 
1. Encoding in GP is UTF8
2. Encoding in SAS session is Latin1
3.SAS verions is 9.4 M6 on linux
 
 
I want to know why cause the issue and how to solve it?
 
 
Thanks
Chen Xu
2 REPLIES 2
gyambqt
Obsidian | Level 7

We changed SAS session from Latin1 to UTF8 and still receiving same error message.

Inrestingly, it worked in our old environment with SAS9.4 M3 

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
  • 2 replies
  • 807 views
  • 0 likes
  • 2 in conversation