<?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: Creating XPT file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-XPT-file/m-p/478894#M286421</link>
    <description>&lt;P&gt;Do SAS XPORT format files support UTF8?&amp;nbsp; DBCS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But your main problem is you need to set your SAS session in a mode that can READ the SAS dataset.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would start by making sure you are running using Unicode support.&lt;/P&gt;
&lt;P&gt;If you can't get that to work try running SAS using DBCS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jul 2018 02:54:16 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-07-18T02:54:16Z</dc:date>
    <item>
      <title>Creating XPT file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-XPT-file/m-p/478806#M286416</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have several SAS datasets I need to convert to XPT files. &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The files are currently SAS7BDAT files.&amp;nbsp; Example:&amp;nbsp;adae.sas7bdat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The files were originally created in Japanese.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I using the following code to create the XPT files but not having success.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;libname insas "~,,,\data";&lt;/DIV&gt;&lt;DIV&gt;libname sasxpt "~...\sas xpt";&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;proc copy in=insas out=sasxpt;&lt;BR /&gt;select adae;&lt;BR /&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The log notes this:&lt;/DIV&gt;&lt;DIV&gt;NOTE: Copying INSAS.ADAE to SASXPT.ADAE (memtype=DATA).&lt;BR /&gt;NOTE: Data file INSAS.ADAE.DATA is in a format that is native to another host, or the file encoding does not match the session&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; performance.&lt;BR /&gt;NOTE: Data file SASXPT.ADAE.DATA is in a format that is native to another host, or the file encoding does not match the session&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; performance.&lt;BR /&gt;ERROR: Unable to transcode character data, such as a name or label, for the file header of SASXPT.ADAE.DATA. Either the data&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contains characters that are not representable in the new encoding or truncation occurred during transcoding.&lt;BR /&gt;ERROR: File SASXPT.ADAE.DATA has not been saved because copy could not be completed.&lt;BR /&gt;NOTE: Statements not processed because of errors noted above.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any ideas?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Jul 2018 20:03:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-XPT-file/m-p/478806#M286416</guid>
      <dc:creator>Dawn_Edgerton</dc:creator>
      <dc:date>2018-07-17T20:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XPT file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-XPT-file/m-p/478825#M286417</link>
      <description>Could be a problem caused by using non-standard names in insas.adae. Can you post the result of proc contents?</description>
      <pubDate>Tue, 17 Jul 2018 20:45:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-XPT-file/m-p/478825#M286417</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2018-07-17T20:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XPT file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-XPT-file/m-p/478844#M286418</link>
      <description>&lt;P&gt;You need to use&lt;FONT face="courier new,courier"&gt; proc cport&lt;/FONT&gt;&amp;nbsp; or&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;SPAN&gt;libname&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;XPTLIB&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;xport&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;"&amp;amp;path";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 22:57:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-XPT-file/m-p/478844#M286418</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-07-17T22:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XPT file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-XPT-file/m-p/478878#M286419</link>
      <description>Thanks for your help. I am now trying Proc CPORT. Here is my code and error messages from the log. The source SAS file contains Japanese text. Could this be the problem?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;libname insas "~...\SAS Data";&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;filename tranfile "~....\adae.xpt";&lt;BR /&gt;proc cport data=insas.adae file=tranfile;&lt;BR /&gt;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;NOTE: Data file INSAS.ADAE.DATA is in a format that is native to another host, or the file encoding does not match the session&lt;BR /&gt;encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce&lt;BR /&gt;performance.&lt;BR /&gt;&lt;BR /&gt;NOTE: PROC CPORT begins to transport data set INSAS.ADAE&lt;BR /&gt;ERROR: Some character data was lost during transcoding in the dataset INSAS.ADAE. Either the data contains characters that are not&lt;BR /&gt;representable in the new encoding or truncation occurred during transcoding.&lt;BR /&gt;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Jul 2018 01:12:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-XPT-file/m-p/478878#M286419</guid>
      <dc:creator>Dawn_Edgerton</dc:creator>
      <dc:date>2018-07-18T01:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XPT file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-XPT-file/m-p/478885#M286420</link>
      <description>&lt;P&gt;The message states that the encoding used to create the files should match the SAS session encoding, or the session can't properly recognise some characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run this to see your session encoding:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;proc options group=languagecontrol; run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you won't or can't change the session encoding, you could try using the INENCODING= and&amp;nbsp;OUTENCODING= libname options to copy these files while respecting their encoding.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am unsure this would work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another pointer: Asian languages might require the CVS libname read engine when being used in a latin encoding session. I am also unsure as I never had to deal with&amp;nbsp;&lt;SPAN&gt;Asian languages.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 01:57:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-XPT-file/m-p/478885#M286420</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-07-18T01:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XPT file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-XPT-file/m-p/478894#M286421</link>
      <description>&lt;P&gt;Do SAS XPORT format files support UTF8?&amp;nbsp; DBCS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But your main problem is you need to set your SAS session in a mode that can READ the SAS dataset.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would start by making sure you are running using Unicode support.&lt;/P&gt;
&lt;P&gt;If you can't get that to work try running SAS using DBCS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 02:54:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-XPT-file/m-p/478894#M286421</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-18T02:54:16Z</dc:date>
    </item>
  </channel>
</rss>

