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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 870 views
  • 0 likes
  • 2 in conversation