BookmarkSubscribeRSS Feed
zhanghaipo
Fluorite | Level 6

data a; set sashelp.class; run;

PROC EXPORT DATA= WORK.A OUTFILE= "C:\Users\lenovo\Desktop\class.dta" DBMS=STATA LABEL REPLACE; RUN;

options MSGLEVEL=I;

PROC IMPORT OUT= WORK.class DATAFILE= "C:\Users\lenovo\Desktop\class.dta" DBMS=STATA REPLACE; RUN;

How to solve this problem,SAS lost some advantage.

19 REPLIES 19
jimbarbour
Meteorite | Level 14

It would be helpful if you could show more of your log using the indicated icons:

jimbarbour_0-1628047422253.png

Often, it's not serious when you get a "VARCHAR data type is not supported by the V9 engine" message in the log.  Usually, SAS just converts it to Char.

 

What are your results like?  Is there a problem with the results or is the message the only issue?

 

Jim

zhanghaipo
Fluorite | Level 6

04113024.png

0804113029.png

SAS exports the file, and then imports it into SAS. The data is inconsistent and the label is missing.

SASKiwi
PROC Star

Looks like you have an encoding difference between Stata and SAS. Run this to check your SAS encoding and post the result:

proc options option = encoding;
run;
zhanghaipo
Fluorite | Level 6

124319.png

Chinese coding,M2, there will be no problem with this operation.M6 has this problem.

zhanghaipo
Fluorite | Level 6

4175937.png

4180114.png

  

180427.png

80430.png

  By comparison, ENCODING=WLATIN1, there is a warning under this code, but there is no problem, but not under Chinese code. This is a bug.

jimbarbour
Meteorite | Level 14

The warning is not a serious one, and the warning is not related to the encoding problem that you are seeing.  The real problem is the encoding and not the Varchar.  

 

I'm not sure this is a bug; I think the configuration just needs to be adjusted.

 

Since you have two SAS versions available, what is the encoding on your older (M2) version of SAS versus your newer (M5) version of SAS?  

 

Jim

zhanghaipo
Fluorite | Level 6

05105314.png

124319.png

  Here are the M2 and M6 SAS versions of the encoding, I think the two encoding are the same, which I have considered, so I think it is a encoding problem.

jimbarbour
Meteorite | Level 14
Well, something is clearly wrong and character data is being lost, the question is exactly where the problem lies in all the various options and settings. I'm going to have to think about it some more.

In the meantime, this paper has some discussion on the subject:
https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2020/4561-2020.pdf

Jim
jimbarbour
Meteorite | Level 14

@zhanghaipo,

 

If you have a moment, would it be possible for you to run the following code in your M2 environment and also your M6 environment?  I would like to see if there are any differences.

PROC OPTIONS GROUP=LANGUAGECONTROL;
RUN;

Thank you,

 

Jim

zhanghaipo
Fluorite | Level 6

134631.png

05134921.png

  E6 added the DSCAS module, abandoned the use of DS2ACCEL=NONE and DSACCEL = NONE, perhaps updated this piece, resulting in some missing characters in the East Asian SAS version.

 

Thank you for your help

 

 Haipo

 

  

 

 

jimbarbour
Meteorite | Level 14

I'm not seeing anything obvious that would cause this issue.  @SASKiwi, do you have any thoughts?

 

Perhaps, @zhanghaipo, you should open a Track with SAS Customer Support.  This should not be happening. 

 

Jim

SASKiwi
PROC Star

I agree with @jimbarbour 's suggestion regarding Tech Support as I can't test Chinese encoding myself. At least you have a workaround using LATIN1 encoding.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 19 replies
  • 6641 views
  • 3 likes
  • 6 in conversation