BookmarkSubscribeRSS Feed
milts
Pyrite | Level 9

Hi,

I have a table in greenplum. Encoding is utf-8. Some fields have a dash "-". When I extract this to the sas workspace the dash gets converted to weird character. Current workaround is to extract then convert the dataset to latin1 encoding. I checked that encoding for sas is also utf-8.

Any other options available? Thanks!

2 REPLIES 2
jakarman
Barite | Level 11

Check the ODBC, SAS/ACCESS greenplum Greenplum client setting (odbdc.ini)

It is this client setting where the translation is done when data is going to SAS form Greenplum.  It is the point where connection SAS/Greenplum is done. There should ben an encoding option at the Greenplum settings.

http://www.emc.com/collateral/software/white-papers/h8240-sas-greenplum-wp.pdf is mentioning a document "Geenplum database .. Connectivity Tools for Unix" on the distribution media (cannot find that one)
 
The database (server) has his encoding of at least the rows. Sometimes limited to utf-16 (fixed) and that being translated to utf-8 (variable) Your database connection being setup as user defined in utf8.
Having SAS running in a utf-8 session you must use clients that are supporting that. Only Eguide is documented tot have that implemented.

Running SAS in utf-8 setting is also requiring looking well at your coding. Not all SAS Coding is correctly run. SAS(R) 9.3 National Language Support (NLS): Reference Guide (wlatin1 is not the same as latin1)

SAS(R) 9.3 National Language Support (NLS): Reference Guide avoid the I18N L0 and L1 type functions.

Having your SAS session run in utf-8 is can block you in connections needing a latin1 encoding. Sounds weird but not all sessions of SAS in different encodings can be connected.
http://support.sas.com/resources/papers/AddingAdditionalSASWorkspaceServerstoSupportMultipleEncoding... 

---->-- ja karman --<-----
Ksharp
Super User

Announce an option to allow SAS import utf-8 file :

infile 'c:\temp\HTML_batch_file_sample.html' dsd dlm='<>' encoding=utf8;

Xia Keshan

sas-innovate-2024.png

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.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1025 views
  • 0 likes
  • 3 in conversation