<?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: Data file is in a format that is native to another host in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-file-is-in-a-format-that-is-native-to-another-host/m-p/434991#M281877</link>
    <description>&lt;P&gt;I really just want to set my dataset in my WORK library and analyze it without getting errors and warnings. My main concern is this line and the fact that it will say an inordinately small number of observations are in the dataset (When I know there are many, many observations).&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;Data&lt;/SPAN&gt; &lt;SPAN class="token statement"&gt;file&lt;/SPAN&gt; CSL&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;CSL1&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;DATA&lt;/SPAN&gt; is &lt;SPAN class="token operator"&gt;in&lt;/SPAN&gt; a &lt;SPAN class="token procnames"&gt;format&lt;/SPAN&gt; that is native to another host&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; or the &lt;SPAN class="token statement"&gt;file&lt;/SPAN&gt;
      encoding does &lt;SPAN class="token operator"&gt;not&lt;/SPAN&gt; match the session encoding&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your comments on the UTF8 encoding. I took&amp;nbsp;this part (which was a "solution" that I found on another person's post regarding the same error) out of my code.&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;datasets&lt;/SPAN&gt; library&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;csl nodetails nolist&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
modify csl1&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; correctencoding&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'utf8'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;quit&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I'm still getting the same errors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;libname csl 'C:\Users\Anna Joy Rogers\Documents\CSL';&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF9900"&gt;proc contents data =csl.csl1; run;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF9900"&gt;proc freq data =csl.csl1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF9900"&gt;tables ab_any; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF9900"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4 proc contents data =csl.csl1; run;&lt;BR /&gt;NOTE: Writing HTML Body file: sashtml.htm&lt;BR /&gt;NOTE: Data file CSL.CSL1.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be&lt;BR /&gt;used, which might require additional CPU resources and might reduce performance.&lt;/P&gt;&lt;P&gt;WARNING: Some character data was lost during transcoding in the dataset CSL.CSL1. Either the&lt;BR /&gt;data contains characters that are not representable in the new encoding or truncation&lt;BR /&gt;occurred during transcoding.&lt;BR /&gt;NOTE: PROCEDURE CONTENTS used (Total process time):&lt;BR /&gt;real time 1.36 seconds&lt;BR /&gt;cpu time 0.54 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;5 proc freq data =csl.csl1;&lt;BR /&gt;NOTE: Data file CSL.CSL1.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be&lt;BR /&gt;used, which might require additional CPU resources and might reduce performance.&lt;BR /&gt;6 tables ab_any;&lt;BR /&gt;WARNING: Some character data was lost during transcoding in the dataset CSL.CSL1. Either the&lt;BR /&gt;data contains characters that are not representable in the new encoding or truncation&lt;BR /&gt;occurred during transcoding.&lt;BR /&gt;7 run;&lt;/P&gt;&lt;P&gt;NOTE: There were 1 observations read from the data set CSL.CSL1.&lt;BR /&gt;NOTE: PROCEDURE FREQ used (Total process time):&lt;BR /&gt;real time 2.26 seconds&lt;BR /&gt;cpu time 0.90 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for your time!&lt;/P&gt;</description>
    <pubDate>Wed, 07 Feb 2018 19:09:41 GMT</pubDate>
    <dc:creator>rogersaj</dc:creator>
    <dc:date>2018-02-07T19:09:41Z</dc:date>
    <item>
      <title>Data file is in a format that is native to another host</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-file-is-in-a-format-that-is-native-to-another-host/m-p/433678#M281875</link>
      <description>&lt;P&gt;I know others have posted this same question, but even after reading the other posts and talking to SAS support, I can't solve the problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname csl 'C:\Users\rogersaj\Documents\CSL';
proc datasets library=csl nodetails nolist;
modify csl1/ correctencoding='utf8';
quit;
data fun; 
set csl.csl1;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here's my log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    libname csl 'C:\Users\rogersaj\Documents\CSL';
NOTE: Libref CSL was successfully assigned as follows:
      Engine:        V9
      Physical Name: C:\Users\rogersaj\Documents\CSL
2    proc datasets library=csl nodetails nolist;
NOTE: Writing HTML Body file: sashtml.htm
3    modify csl1/ correctencoding='utf8';
WARNING: CORRECTENCODING was successful. MODIFY RUN group closed because the ENCODING value
         does not match the session encoding value.
4    quit;

NOTE: PROCEDURE DATASETS used (Total process time):
      real time           0.50 seconds
      cpu time            0.34 seconds


5    data fun;
6        set csl.csl1;
NOTE: Data file CSL.CSL1.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.
WARNING: Some character data was lost during transcoding in the dataset CSL.CSL1. Either the
         data contains characters that are not representable in the new encoding or truncation
         occurred during transcoding.
7    run;

ERROR: Some character data was lost during transcoding in the dataset WORK.FUN. Either the
       data contains characters that are not representable in the new encoding or truncation
       occurred during transcoding.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.FUN may be incomplete.  When this step was stopped there were 0
         observations and 805 variables.
NOTE: DATA statement used (Total process time):
      real time           0.05 seconds
      cpu time            0.04 seconds

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help? Thank you!!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 19:50:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-file-is-in-a-format-that-is-native-to-another-host/m-p/433678#M281875</guid>
      <dc:creator>rogersaj</dc:creator>
      <dc:date>2018-02-02T19:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Data file is in a format that is native to another host</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-file-is-in-a-format-that-is-native-to-another-host/m-p/433701#M281876</link>
      <description>&lt;P&gt;What are you trying to do?&lt;/P&gt;
&lt;P&gt;I sort of looks like you are trying to change the encoding of the characters in a dataset?&lt;/P&gt;
&lt;P&gt;What encoding was used to generate the original dataset?&lt;/P&gt;
&lt;P&gt;What encoding is your current SAS session using?&lt;/P&gt;
&lt;P&gt;What encoding to your want the new version of the dataset to use?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like you are trying to read a dataset made using UTF8 encoding into a session that is using a single byte encoding like WLATIN1 then it is very likely there are characters represented in the UTF8 encoding system that cannot be represented by a single byte in WLATIN1.&amp;nbsp; So don't do that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even if you get all of that correct it still might be possible that the actual values in the data are invalid strings.&amp;nbsp; For example the original encoding might have been in UTF8 or something that allow multiple bytes per character and the data has gotten truncated when saved into the SAS dataset such that the last character is missing the final few bytes that would fully define it.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 21:19:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-file-is-in-a-format-that-is-native-to-another-host/m-p/433701#M281876</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-02-02T21:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Data file is in a format that is native to another host</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-file-is-in-a-format-that-is-native-to-another-host/m-p/434991#M281877</link>
      <description>&lt;P&gt;I really just want to set my dataset in my WORK library and analyze it without getting errors and warnings. My main concern is this line and the fact that it will say an inordinately small number of observations are in the dataset (When I know there are many, many observations).&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;Data&lt;/SPAN&gt; &lt;SPAN class="token statement"&gt;file&lt;/SPAN&gt; CSL&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;CSL1&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;DATA&lt;/SPAN&gt; is &lt;SPAN class="token operator"&gt;in&lt;/SPAN&gt; a &lt;SPAN class="token procnames"&gt;format&lt;/SPAN&gt; that is native to another host&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; or the &lt;SPAN class="token statement"&gt;file&lt;/SPAN&gt;
      encoding does &lt;SPAN class="token operator"&gt;not&lt;/SPAN&gt; match the session encoding&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your comments on the UTF8 encoding. I took&amp;nbsp;this part (which was a "solution" that I found on another person's post regarding the same error) out of my code.&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;datasets&lt;/SPAN&gt; library&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;csl nodetails nolist&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
modify csl1&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; correctencoding&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'utf8'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;quit&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I'm still getting the same errors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;libname csl 'C:\Users\Anna Joy Rogers\Documents\CSL';&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF9900"&gt;proc contents data =csl.csl1; run;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF9900"&gt;proc freq data =csl.csl1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF9900"&gt;tables ab_any; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF9900"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4 proc contents data =csl.csl1; run;&lt;BR /&gt;NOTE: Writing HTML Body file: sashtml.htm&lt;BR /&gt;NOTE: Data file CSL.CSL1.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be&lt;BR /&gt;used, which might require additional CPU resources and might reduce performance.&lt;/P&gt;&lt;P&gt;WARNING: Some character data was lost during transcoding in the dataset CSL.CSL1. Either the&lt;BR /&gt;data contains characters that are not representable in the new encoding or truncation&lt;BR /&gt;occurred during transcoding.&lt;BR /&gt;NOTE: PROCEDURE CONTENTS used (Total process time):&lt;BR /&gt;real time 1.36 seconds&lt;BR /&gt;cpu time 0.54 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;5 proc freq data =csl.csl1;&lt;BR /&gt;NOTE: Data file CSL.CSL1.DATA is in a format that is native to another host, or the file&lt;BR /&gt;encoding does not match the session encoding. Cross Environment Data Access will be&lt;BR /&gt;used, which might require additional CPU resources and might reduce performance.&lt;BR /&gt;6 tables ab_any;&lt;BR /&gt;WARNING: Some character data was lost during transcoding in the dataset CSL.CSL1. Either the&lt;BR /&gt;data contains characters that are not representable in the new encoding or truncation&lt;BR /&gt;occurred during transcoding.&lt;BR /&gt;7 run;&lt;/P&gt;&lt;P&gt;NOTE: There were 1 observations read from the data set CSL.CSL1.&lt;BR /&gt;NOTE: PROCEDURE FREQ used (Total process time):&lt;BR /&gt;real time 2.26 seconds&lt;BR /&gt;cpu time 0.90 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for your time!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 19:09:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-file-is-in-a-format-that-is-native-to-another-host/m-p/434991#M281877</guid>
      <dc:creator>rogersaj</dc:creator>
      <dc:date>2018-02-07T19:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Data file is in a format that is native to another host</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-file-is-in-a-format-that-is-native-to-another-host/m-p/435014#M281878</link>
      <description>&lt;P&gt;Make sure that you are running SAS with UTF8 encoding.&amp;nbsp; How to do that depends on how you are running SAS.&amp;nbsp; If you are using interactive SAS with Display Manager on Windows then your installation process should have created Start menu commands to launch SAS using different encodings.&amp;nbsp; On my machine they set it up with&amp;nbsp;one icon labeled "SAS 9.4 (English)" that uses WLATIN1 and another labeled "SAS 9.4 (Unicode support)" that uses UTF-8.&amp;nbsp; Similarly on Unix they setup separate commands to launch SAS with and without UTF-8 support. If you are using Enterprise Guide or SAS/Studio the choice is made by which application server you connect to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you are running SAS with the right encoding then you should be able to read any of the other dataset.&amp;nbsp; If you are running with ENCODING='UTF-8' then you should be able to read data that uses any other encoding.&amp;nbsp; But you might not be able to go the other way.&amp;nbsp; So it might be best to just always use UTF-8.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can just re-create the dataset.&amp;nbsp; You could just run a data step to copy it, but I like to use PROC COPY so that I can move a whole library at once.&amp;nbsp; But make sure the add the NOCLONE option so that it actually re-builds the dataset instead of just copying them.&amp;nbsp; I also like to use the DATECOPY option so that the metadata reflects when the original file was created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname in 'folder with foreign datasets';
libnmae out 'new folder for local datasets';
proc copy inlib=in outlib=out noclone datecopy ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 19:09:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-file-is-in-a-format-that-is-native-to-another-host/m-p/435014#M281878</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-02-07T19:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Data file is in a format that is native to another host</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-file-is-in-a-format-that-is-native-to-another-host/m-p/435021#M281879</link>
      <description>&lt;P&gt;Thank you so very much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS had been installed on my new machine and by default was using SAS 9.4 (English with DCBS). Now that I've changed it to SAS 9.4 (Unicode support), my issue has been solved.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 19:30:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-file-is-in-a-format-that-is-native-to-another-host/m-p/435021#M281879</guid>
      <dc:creator>rogersaj</dc:creator>
      <dc:date>2018-02-07T19:30:28Z</dc:date>
    </item>
  </channel>
</rss>

