<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Solution for ERROR: Some character data was lost during transcoding in the dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/346134#M79760</link>
    <description>&lt;P&gt;Thanks for pointing out the bad link! Sorry for the inconvenience.&lt;/P&gt;</description>
    <pubDate>Fri, 31 Mar 2017 13:27:16 GMT</pubDate>
    <dc:creator>ehbales</dc:creator>
    <dc:date>2017-03-31T13:27:16Z</dc:date>
    <item>
      <title>Solution for ERROR: Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/276563#M55420</link>
      <description>&lt;P&gt;When I search for the mentioned error I get the link solution provided adminstration oriented but developers do not have access.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;A href="http://support.sas.com/kb/52/716.html" target="_blank"&gt;http://support.sas.com/kb/52/716.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please see my solution below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc options option=config; run;&lt;/P&gt;
&lt;P&gt;proc options group=languagecontrol; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* Show the encoding value for the problematic data set */&lt;/P&gt;
&lt;P&gt;%let dsn=item_information_may16;&lt;/P&gt;
&lt;P&gt;%let dsid=%sysfunc(open(&amp;amp;dsn,i));&lt;/P&gt;
&lt;P&gt;%put &amp;amp;dsn ENCODING is: %sysfunc(attrc(&amp;amp;dsid,encoding));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*Renaming item desc file &amp;nbsp;(encoding=any) allowed reading****************************/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data tmp.item_info_curr;&lt;/P&gt;
&lt;P&gt;set hc.item_information_may16 (encoding=any);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*gave error*/&lt;/P&gt;
&lt;P&gt;data&amp;nbsp;item_info_curr;&lt;/P&gt;
&lt;P&gt;set item_information_may16;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2016 17:04:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/276563#M55420</guid>
      <dc:creator>lokendra_devangan_corecompete_com</dc:creator>
      <dc:date>2016-06-10T17:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Solution for ERROR: Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/276644#M55454</link>
      <description>&lt;PRE&gt;

You could try this code to avoid these ERROR.


libname xx cvp '/folders/myfolders/';
proc copy in=xx out=work noclone;
 select class;
run;

&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 Jun 2016 03:16:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/276644#M55454</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-11T03:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Solution for ERROR: Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/323458#M71695</link>
      <description>&lt;P&gt;The cause of the error may be truncation rather than transcoding. If your SAS session encoding is UTF-8 and your data set encoding is another encoding, the error may be telling you that the length of one or more character variables is not long enough to hold the UTF-8 version of a string. Some characters require more bytes in UTF-8 than they did in the "legacy" encodings that SAS supports.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that is the scenario you have, the CVP engine may be helpful to you. Several resources are available that you may find useful:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The National Language Reference Guide for 9.4 has some sample code showing how to use CVP. See the section "Avoiding Character Data Truncation by Using the CVP Engine" in the "Transcoding in NLS" chapter of the NLS Concepts section.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The white paper titled Multilingual Computing with SAS 9.4 also discusses CVP and other issues related to working with multilingual data. The paper was written for 9.4, but many of the features documented there are available with earlier releases of SAS 9.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/Multilingual_Computing_with_SAS_94.pdf%C2%A0" target="_blank" rel="nofollow noopener noreferrer"&gt;http://support.sas.com/resources/papers/Multilingu&lt;WBR /&gt;al_Computing_with_SAS_94.pdf&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 20:46:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/323458#M71695</guid>
      <dc:creator>ehbales</dc:creator>
      <dc:date>2017-01-09T20:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Solution for ERROR: Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/345745#M79584</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&lt;/P&gt;&lt;P&gt;I tried below code but still, I got the same error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Some character data was lost during transcoding in the dataset XX.AA. Either the data&lt;BR /&gt;contains characters that are not representable in the new encoding or truncation&lt;BR /&gt;occurred during transcoding."&lt;/P&gt;&lt;PRE&gt;libname xx cvp '/folders/myfolders/';
proc copy in=xx out=work noclone;
 select class;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;what should I do to read Hindi Language&amp;nbsp;words in SAS 9.4 (English with DBCS)?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 13:49:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/345745#M79584</guid>
      <dc:creator>india2016</dc:creator>
      <dc:date>2017-03-30T13:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Solution for ERROR: Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/345763#M79595</link>
      <description>&lt;P&gt;By default, the configuration file for the configuration called "English with DBCS Support" sets the ENCODING (SAS session encoding) to an encoding that supports Japanese. The Hindi characters are not supported by the Japanese encoding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use the configuration that is created under the "nls/u8" directory, that will set the SAS session encoding to UTF-8. The Hindi characters are supported there.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are already using UTF-8, then try increasing the multiplier of the CVP engine. Hindi characters require 3 bytes per character. You probably need to set the CVPMULTIPLIER= option to 3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more information, check this comprehensive article:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.sas.com/content/sgf/2017/05/19/demystifying-and-resolving-common-transcoding-problems/" target="_self"&gt;Demystifying and resolving common transcoding problems&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;You'll learn about:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://go.documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=nlsref&amp;amp;docsetTarget=n11ag7u03jhawrn19cbftm103e4p.htm&amp;amp;locale=en" target="_self"&gt;The CVP engine&lt;/A&gt; to help convert data from one encoding to another&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://go.documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=nlsref&amp;amp;docsetTarget=n02q3gv9mfdwnmn1ca9kqa3gbayl.htm&amp;amp;locale=en" target="_self"&gt;ENCODING=ASCIIANY and OUTENCODING=&lt;/A&gt;&lt;SPAN&gt;&lt;A href="http://go.documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=nlsref&amp;amp;docsetTarget=n02q3gv9mfdwnmn1ca9kqa3gbayl.htm&amp;amp;locale=en" target="_self"&gt;ASCIIANY&amp;nbsp;options&lt;/A&gt; for suppressing transcoding&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 11 Aug 2017 16:03:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/345763#M79595</guid>
      <dc:creator>ehbales</dc:creator>
      <dc:date>2017-08-11T16:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Solution for ERROR: Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/345774#M79603</link>
      <description>&lt;P&gt;The link in your post doesn't work. But if I copy the text of the link and paste it into browser then it does work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;http://support.sas.com/resources/papers/Multilingual_Computing_with_SAS_94.pdf&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Let me see if I can recreate the link to see why it didn't work in your post.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="http://support.sas.com/resources/papers/Multilingual_Computing_with_SAS_94.pdf" target="_self"&gt;http://support.sas.com/resources/papers/Multilingual_Computing_with_SAS_94.pdf&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the link here works. I think in your post the URL had an extra space in it.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 14:46:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/345774#M79603</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-03-30T14:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Solution for ERROR: Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/346123#M79756</link>
      <description>&lt;PRE&gt;

Yeah. That is ENCODING problem.
Change your sas session encoding to be the same encoding

&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Mar 2017 12:55:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/346123#M79756</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-03-31T12:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Solution for ERROR: Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/346134#M79760</link>
      <description>&lt;P&gt;Thanks for pointing out the bad link! Sorry for the inconvenience.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2017 13:27:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solution-for-ERROR-Some-character-data-was-lost-during/m-p/346134#M79760</guid>
      <dc:creator>ehbales</dc:creator>
      <dc:date>2017-03-31T13:27:16Z</dc:date>
    </item>
  </channel>
</rss>

