<?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: ERROR: Some character data was lost during transcoding in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746569#M234206</link>
    <description>&lt;P&gt;Transcoding is tricky.&amp;nbsp; You need to do some research to see what is happening.&lt;/P&gt;
&lt;P&gt;First what encoding is you current SAS session using?&amp;nbsp; Look at the SYSENCODING macro variable.&amp;nbsp; Or the ENCODING option.&amp;nbsp; &amp;nbsp;To change that you need to change how you are starting SAS.&amp;nbsp; Are you running SAS using Display Manager?&amp;nbsp; Enterprise Guide? SAS/Studio? From the command line as background job?&amp;nbsp; Something else?&amp;nbsp; The way to change the system encoding differs between those different methods of submitting SAS code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second what encoding does the dataset you are trying to read use?&amp;nbsp; Run PROC CONTENTS on the dataset.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jun 2021 19:59:08 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2021-06-08T19:59:08Z</dc:date>
    <item>
      <title>ERROR: Some character data was lost during transcoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746551#M234201</link>
      <description>&lt;P&gt;When I tried to re-run an old program I got the following error:&amp;nbsp;ERROR: Some character data was lost during transcoding in the dataset BASE_P.DAT_RAND. Either the data contains characters that are not representable in the new encoding or truncation occurred during transcoding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does any one know what the problem is? Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;27         PROC SORT data=base_p.Dat_rand out=Dat_rand; BY SUBNUM; RUN;
NOTE: Data file BASE_P.DAT_RAND.DATA is in a format that is native to another host, or the file encoding does not match the session 
      encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce 
      performance.

&lt;STRONG&gt;ERROR: Some character data was lost during transcoding in the dataset BASE_P.DAT_RAND. Either the data contains characters that are 
       not representable in the new encoding or truncation occurred during transcoding.&lt;/STRONG&gt;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 9 observations read from the data set BASE_P.DAT_RAND.
WARNING: The data set WORK.DAT_RAND may be incomplete.  When this step was stopped there were 0 observations and 12 variables.
WARNING: Data set WORK.DAT_RAND was not replaced because this step was stopped.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.03 seconds
      cpu time            0.01 seconds&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Jun 2021 19:00:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746551#M234201</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2021-06-08T19:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Some character data was lost during transcoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746556#M234203</link>
      <description>&lt;P&gt;I also got the following error:&lt;/P&gt;
&lt;P&gt;ERROR: File BASE_P.FORMATS.CATALOG was created for a different operating system.&lt;BR /&gt;NOTE: Format CVTYPE was not found or could not be loaded.&lt;BR /&gt;ERROR: File BASE_P.FORMATS.CATALOG was created for a different operating system.&lt;BR /&gt;NOTE: Format $CNY was not found or could not be loaded.&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I ask for xpt files and then convert to SAS files, will this help fix this issue?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 19:06:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746556#M234203</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2021-06-08T19:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Some character data was lost during transcoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746562#M234204</link>
      <description>&lt;P&gt;The XPT extension is ambiguous.&lt;/P&gt;
&lt;P&gt;You cannot transport catalogs in XPORT files.&amp;nbsp; You can in CPORT files instead.&amp;nbsp; So if they use PROC CPORT they can make a transport file that includes format catalos and/or SAS datasets.&amp;nbsp; &amp;nbsp;They could also use PROC FORMAT to generate a dataset that describes the formats using the CNTLOUT= option and transfer that dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To handle the transcoding issue make sure you are running your SAS session using either same encoding as the datasets you are trying to read.&amp;nbsp; Or you are using UTF-8 encoding (also called "unicode support").&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 19:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746562#M234204</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-06-08T19:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Some character data was lost during transcoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746564#M234205</link>
      <description>&lt;P&gt;update: I found a machine with 64bit SAS, and the format errors are gone.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I only have the transcoding error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 19:37:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746564#M234205</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2021-06-08T19:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Some character data was lost during transcoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746569#M234206</link>
      <description>&lt;P&gt;Transcoding is tricky.&amp;nbsp; You need to do some research to see what is happening.&lt;/P&gt;
&lt;P&gt;First what encoding is you current SAS session using?&amp;nbsp; Look at the SYSENCODING macro variable.&amp;nbsp; Or the ENCODING option.&amp;nbsp; &amp;nbsp;To change that you need to change how you are starting SAS.&amp;nbsp; Are you running SAS using Display Manager?&amp;nbsp; Enterprise Guide? SAS/Studio? From the command line as background job?&amp;nbsp; Something else?&amp;nbsp; The way to change the system encoding differs between those different methods of submitting SAS code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second what encoding does the dataset you are trying to read use?&amp;nbsp; Run PROC CONTENTS on the dataset.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 19:59:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746569#M234206</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-06-08T19:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Some character data was lost during transcoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746576#M234207</link>
      <description>&lt;P&gt;Than you. I checked the data and the encoding was UTF-8 Unicode.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fengyuwuzu_0-1623182714670.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60156iABCCE7BC24E2DDD4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fengyuwuzu_0-1623182714670.png" alt="fengyuwuzu_0-1623182714670.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My SAS encoding is WLATIN1&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fengyuwuzu_1-1623182826817.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60157i1AACD4D84AFE0D1F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fengyuwuzu_1-1623182826817.png" alt="fengyuwuzu_1-1623182826817.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I am running SAS in both SAS EG 7.15 and&amp;nbsp; SAS 9.4 in windows&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 20:09:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746576#M234207</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2021-06-08T20:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Some character data was lost during transcoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746582#M234209</link>
      <description>&lt;P&gt;So you are probably using a PC to be able to run Enterprise Guide.&lt;/P&gt;
&lt;P&gt;When you start SAS directly do you click on an ICON (or select one from the START menu)?&amp;nbsp; Which one do you use?&amp;nbsp; When they installed SAS on my PC they made different commands for launching it using WLATIN1 and using UTF-8.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60158i856245FA300408AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;With Enterprise Guide you would need to change the application server it is connecting to in order to allow you to run SAS code to one that is using UTF-8.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 20:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746582#M234209</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-06-08T20:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Some character data was lost during transcoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746632#M234231</link>
      <description>&lt;P&gt;Thank you Tom.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found I also have SAS 9.4 (Unicode support) and there is no error with it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 00:16:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Some-character-data-was-lost-during-transcoding/m-p/746632#M234231</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2021-06-09T00:16:11Z</dc:date>
    </item>
  </channel>
</rss>

