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 

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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