cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar

[ Help ] export table to SAS : encoding issue

Hi All,

I'm using the following script for exporting some tables (here PANELISTE table) to a SAS library (here PIF).

conn = SAS Connect( "SASApp" ); 

SAS Submit( "libname PIF '\\PRSASA01\dro\AVAUCLAIR\TST';"); 

dt2 = Open Database("DSN=XPANEL;UID=user_id;PWD=01010101;APP=JMP;WSID=VUC0029;Network=DBMSSOCN", // data source 

"PANELISTE" ); 

SAS Export Data( dt2, "PIF", "PANELISTE", ReplaceExisting ); 

Close( dt2 );


this script works for some other tables but not for this one because of an encoding issue. There's a field in PANELISTE table that contains little arrows where there should be letters with accents.

I was thinking so to a workaround and using the following function:

SAS Send File("source", "dest", "encoding")  

where "encoding" would be "latin1"

but I don't know what to put in "source" and  "dest" arguments . Would someone be able to help me?

Is this function usefull in this case?

thanks a lot

Antoine

6 REPLIES 6
Eric_Hill
Staff

Re: [ Help ] export table to SAS : encoding issue

Hey, Antoine,

I don't think SAS Send File() is the answer.  We need to know what encoding SAS is running in.  If SAS is not running in an encoding compatible with the characters in that troublesome PANELISTE field, nothing you do from the JMP side will help.

Can you run this JSL:

sas = Current SAS Connection();

sas << Submit( "proc options option=encoding; run;" );

and then check the SAS Log and see what it reports?  That should help us get to the next step.

Thanks,

Eric

Re: [ Help ] export table to SAS : encoding issue

Hi Eric,

Thanks for your answer !

The default character-set encoding for the SAS session is WLATIN1

Antoine

Eric_Hill
Staff

Re: [ Help ] export table to SAS : encoding issue

Okay, and are the characters in the troublesome PANELISTE field part of the WLATIN1 encoding, as far as you know?

When you say that this troublesome field "contains little arrows where there should be letters with accents", are the characters correct in JMP but incorrect (little arrows) in SAS after you have sent them?

If the characters are not valid WLATIN1 characters, SAS will never display them correctly unless it is running in an encoding that supports those characters.  Do you have the power to change the encoding that SAS is running in (to, say, Unicode or UTF-8) if it comes to that?

Eric

Eric_Hill
Staff

Re: [ Help ] export table to SAS : encoding issue

Also, if there is any way you could attach a subset of the JMP data table you are trying to expert to this thread, anonomized appropriately, we could similate the problem here.  Or, if you don't want to attach it to a public thread, you could initiate a JMP Technical Support track.

Eric

Re: [ Help ] export table to SAS : encoding issue

Hi,

are the characters in the troublesome PANELISTE field part of the WLATIN1 encoding, as far as you know?

I don't know. I didn't get any answer about that.

When you say that this troublesome field "contains little arrows where there should be letters with accents", are the characters correct in JMP but incorrect (little arrows) in SAS after you have sent them?

Characters are already incorrect in JMP

Eric_Hill
Staff

Re: [ Help ] export table to SAS : encoding issue

Ahhh.  If the characters are wrong in JMP, I doubt you will be able to fix them by sending them to SAS.  If the characters are correct in your database before you bring them into JMP, the question would be why are they wrong in JMP after the you bring them in from the database. 

I would encourage you to open a track with JMP Technical Support on this.  Options for doing so can be found at Support | JMP.

Thanks,

Eric