<?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: How do I convert .xpt to sas file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/260343#M50505</link>
    <description>&lt;P&gt;You have hit the prime example of why not to use proprietary file formats. &amp;nbsp;What version of SAS are you using to open the file - is it Windows, is it 64 bit or 32bit? &amp;nbsp;What system compiled the file? &amp;nbsp;Was that Windows, was it 64 or 32 bit? &amp;nbsp;Simply put, a catalog created under a 32bit system, cannot be opened on a 64bit machine and vice versa. &amp;nbsp;You need to match the bitness of the file to be able to open it. &amp;nbsp;This has caused us a lot of problems as well, as we have compiled macros and such like from vendors from years back that we can't use now the sytem changed. &amp;nbsp;There is not slution to this other than getting the code and re-running or matching bitness.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could just ignore the formats and catalog with&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;options nofmterr;&lt;/PRE&gt;
&lt;P&gt;Refer to this page:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/14/549.html" target="_blank"&gt;http://support.sas.com/kb/14/549.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My advice, always use plain open text for your file formats, e.g. XML/CSV for data, text for programs, and avoid proprietary file formats altogether. &amp;nbsp;I know certain regulatory bodies still require XPT files, but that will disappear soon - XML is becoming more prevalent.&lt;/P&gt;</description>
    <pubDate>Thu, 31 Mar 2016 08:28:27 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-03-31T08:28:27Z</dc:date>
    <item>
      <title>How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259648#M50246</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to use .xpt files so I am a little confused how to get them to SAS-files.&lt;/P&gt;&lt;P&gt;I have tried with proc cimport like:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;libname&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; oai &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'C:\Users\Documents'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;libname&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; xptfile &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;xport&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'C:\Users\Documents\Enrollees.xpt'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;cimport&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;infile&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=xptfile library=oai;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;Log tells me that the data sep was updated with variables and observations, but when I want to open the file it tells me that it cant be opened..I also tried the following data-step: &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;libname&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; xportin &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;xport&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;'C:\Users\Documents\Enrollees.xpt'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;libname&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; target &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'C:\Users\Documents'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; target.Enrollees ;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; xportin.Enrollees;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;but then I get the following error &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The file XPORTIN.ENROLLEES.DATA has too long a member name for the XPORTIN library.&lt;/P&gt;&lt;P&gt;11 run;&lt;/P&gt;&lt;P&gt;Can anybody help me and has an idea what to do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&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;</description>
      <pubDate>Tue, 29 Mar 2016 13:13:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259648#M50246</guid>
      <dc:creator>J_L</dc:creator>
      <dc:date>2016-03-29T13:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259655#M50247</link>
      <description>&lt;P&gt;I always use the code:&lt;/P&gt;
&lt;PRE&gt;libname a "c:\somewher";
libname xptfile xport "c:\anxpt.xpt" access=readonly;
proc copy inlib=xptfile outlib=a;
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Mar 2016 13:31:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259655#M50247</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-03-29T13:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259677#M50258</link>
      <description>Thanks for your advice, if I type this statement, SAS tells me that the file might have been created by a cport statement and I should use proc cimport to convert it in na native SAS format&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Mar 2016 14:14:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259677#M50258</guid>
      <dc:creator>J_L</dc:creator>
      <dc:date>2016-03-29T14:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259683#M50259</link>
      <description>&lt;P&gt;Please post the entire log results including the code.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 14:24:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259683#M50259</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-03-29T14:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259695#M50263</link>
      <description>&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;this is the code I tried that was posted&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;libname&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; oai &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'C:\Users\m244906\Documents'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;libname&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; xptfile &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;xport&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'C:\Users\m244906\Documents\Enrollees.xpt'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;access&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=readonly;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;copy&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; inlib=xptfile &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;outlib&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=oai;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;and here is the log &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;libname oai 'C:\Users\m244906\Documents';&lt;/P&gt;&lt;P&gt;NOTE: Libref OAI was successfully assigned as follows:&lt;/P&gt;&lt;P&gt;Engine: V9&lt;/P&gt;&lt;P&gt;Physical Name: C:\Users\m244906\Documents&lt;/P&gt;&lt;P&gt;2 libname xptfile xport 'C:\Users\m244906\Documents\Enrollees.xpt' access=readonly;&lt;/P&gt;&lt;P&gt;NOTE: Libref XPTFILE was successfully assigned as follows:&lt;/P&gt;&lt;P&gt;Engine: XPORT&lt;/P&gt;&lt;P&gt;Physical Name: C:\Users\m244906\Documents\Enrollees.xpt&lt;/P&gt;&lt;P&gt;3 proc copy inlib=xptfile outlib=oai;&lt;/P&gt;&lt;P&gt;NOTE: Writing HTML Body file: sashtml.htm&lt;/P&gt;&lt;P&gt;4 run;&lt;/P&gt;&lt;P&gt;NOTE: Input library XPTFILE is sequential.&lt;/P&gt;&lt;P&gt;ERROR: File is probably a cport file. XPORT engine unable to read file created by proc cport.&lt;/P&gt;&lt;P&gt;Please use proc cimport to convert this file to native format.&lt;/P&gt;&lt;P&gt;NOTE: Statements not processed because of errors noted above.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE COPY used (Total process time):&lt;/P&gt;&lt;P&gt;real time 1.38 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.93 seconds&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 14:46:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259695#M50263</guid>
      <dc:creator>J_L</dc:creator>
      <dc:date>2016-03-29T14:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259702#M50266</link>
      <description>&lt;P&gt;Ah, looking at the SAS help. &amp;nbsp;It looks like your original code is incorrect:&lt;/P&gt;
&lt;PRE&gt;filename importin '&lt;SPAN class="emphMono"&gt;transport-file&lt;/SPAN&gt;';
libname target '&lt;SPAN class="emphMono"&gt;SAS-data-library&lt;/SPAN&gt;';
proc cimport infile=importin library=target;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;From:&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/movefile/59598/HTML/default/viewer.htm#a000763417.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/movefile/59598/HTML/default/viewer.htm#a000763417.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 14:57:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259702#M50266</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-03-29T14:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259709#M50270</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/79061"&gt;@J_L﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are two different types of XPT files I'm aware of and the methods to convert them to SAS datasets (or catalogs etc.) cannot be used interchangeably:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;XPT files created using PROC COPY and the XPORT engine&lt;/LI&gt;
&lt;LI&gt;XPT files created using PROC CPORT&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;According to your description (PROC CIMPORT seemed to work) your XPT file is of the second type. So, you should &lt;EM&gt;not&lt;/EM&gt; involve the XPORT engine (by specifying this in a LIBNAME statement), but use PROC CIMPORT as RW9 has suggested in his second post.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 15:05:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259709#M50270</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-03-29T15:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259710#M50271</link>
      <description>&lt;P&gt;thanks, I just saw this code and tried it immediately. The log is ok but when i want to open the data file it tells me&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;filename&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; importin &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'C:\Users\m244906\Documents\Enrollees.xpt'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;libname&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; target &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'C:\Users\m244906\Documents'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;cimport&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;infile&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=importin library=target &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;memtype&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=data;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Unable to open the the table target.enrollees, do you want to open another table &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;and then the log shows &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;ERROR: Format GENDER not found or couldn't be loaded for variable P02SEX.&lt;/P&gt;&lt;P&gt;ERROR: Format YNDK not found or couldn't be loaded for variable P02HISP.&lt;/P&gt;&lt;P&gt;ERROR: Format COHORT not found or couldn't be loaded for variable V00COHORT.&lt;/P&gt;&lt;P&gt;ERROR: Format IMAGES not found or couldn't be loaded for variable V00IMAGESA.&lt;/P&gt;&lt;P&gt;ERROR: Format RACECAT not found or couldn't be loaded for variable P02RACE.&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 15:06:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259710#M50271</guid>
      <dc:creator>J_L</dc:creator>
      <dc:date>2016-03-29T15:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259772#M50299</link>
      <description>&lt;P&gt;These errors simply mean that there are formats permanently assigned to variables in the dataset and these formats are not available in your SAS session. As a first remedy you could submit&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nofmterr;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then you should be able to open the dataset and see the "unformatted" (or rather default-formatted) values of variables P02SEX, P02HISP, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideally you should try to get the format catalog or a CNTLOUT dataset of it or the format definitions as SAS code in order to see the formatted values. Was nothing like this contained in the XPT file?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 16:37:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/259772#M50299</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-03-29T16:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/260338#M50503</link>
      <description>&lt;P&gt;Thanks for your help with the options nofmterr .&lt;/P&gt;&lt;P&gt;I now received a xpt formats file and also other files named SAS Catalog (also with formats).&lt;/P&gt;&lt;P&gt;I tried to open the formats xpt file with the same statement mentioned above but that wont work.&lt;/P&gt;&lt;P&gt;File TARGET.FORMATS.CATALOG was created for a different operating system.&lt;/P&gt;&lt;P&gt;ERROR: Unable to open catalog TARGET.FORMATS.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE CIMPORT used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.01 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;than I tried with the SAS help to import multiple catalogs with the cimport statement and the memtype=cataloge statement&lt;/P&gt;&lt;P&gt;but there is also the same error&lt;/P&gt;&lt;P&gt;ERROR: File TARGET.FORMATS.CATALOG was created for a different operating system.&lt;/P&gt;&lt;P&gt;ERROR: Unable to open catalog TARGET.FORMATS.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE CIMPORT used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.03 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.01 second&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What now, I am really confused&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 08:03:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/260338#M50503</guid>
      <dc:creator>J_L</dc:creator>
      <dc:date>2016-03-31T08:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/260343#M50505</link>
      <description>&lt;P&gt;You have hit the prime example of why not to use proprietary file formats. &amp;nbsp;What version of SAS are you using to open the file - is it Windows, is it 64 bit or 32bit? &amp;nbsp;What system compiled the file? &amp;nbsp;Was that Windows, was it 64 or 32 bit? &amp;nbsp;Simply put, a catalog created under a 32bit system, cannot be opened on a 64bit machine and vice versa. &amp;nbsp;You need to match the bitness of the file to be able to open it. &amp;nbsp;This has caused us a lot of problems as well, as we have compiled macros and such like from vendors from years back that we can't use now the sytem changed. &amp;nbsp;There is not slution to this other than getting the code and re-running or matching bitness.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could just ignore the formats and catalog with&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;options nofmterr;&lt;/PRE&gt;
&lt;P&gt;Refer to this page:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/14/549.html" target="_blank"&gt;http://support.sas.com/kb/14/549.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My advice, always use plain open text for your file formats, e.g. XML/CSV for data, text for programs, and avoid proprietary file formats altogether. &amp;nbsp;I know certain regulatory bodies still require XPT files, but that will disappear soon - XML is becoming more prevalent.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 08:28:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/260343#M50505</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-03-31T08:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/260366#M50513</link>
      <description>&lt;P&gt;Ah ok I see... I am using SAS 9.3 and Windows 64 bit. The datasets are from a public resource database. They state that they used&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;"SAS CPORT and the SAS V9 engine in the Windows environment." to create the datasets.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I guess using the datasets without the formats will then be the easiest way to work with &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 10:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/260366#M50513</guid>
      <dc:creator>J_L</dc:creator>
      <dc:date>2016-03-31T10:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/260368#M50515</link>
      <description>&lt;P&gt;Probably, its a real nuisance I know. &amp;nbsp;If you had access to a 32bit install of SAS you could export the formats to dataset and then copy that to your 64bit install. &amp;nbsp;You might be able to do this with the SAS Universal Viewer:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/software/products/univiewer/#s1=1" target="_blank"&gt;http://support.sas.com/software/products/univiewer/#s1=1&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I.e. open it in 32bit version of that, then save to flat file.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 10:50:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/260368#M50515</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-03-31T10:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/395253#M95278</link>
      <description>&lt;P&gt;Hello, &amp;nbsp;I am getting an error when attempting to download SAS code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I click on the link, I get the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;"ERROR - File is probably a cport file. &amp;nbsp;XPORT engine unable to read file created by proc cport. &amp;nbsp;Please use proc cimport to convert this file to native format."&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do I do?&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;</description>
      <pubDate>Tue, 12 Sep 2017 19:49:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/395253#M95278</guid>
      <dc:creator>Virtuous35</dc:creator>
      <dc:date>2017-09-12T19:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I convert .xpt to sas file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/395411#M95355</link>
      <description>&lt;P&gt;Please open a new thread rather than posting in old topics. &amp;nbsp;SAS code is plain text files so would not need cimport or anything like that. &amp;nbsp;If its SAS data or catalogs then yes, you may need it. &amp;nbsp;Follow the given warning and use cimport - examples in the documentation. &amp;nbsp;If not, post a new question, show the file you are having difficulty with. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 07:45:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-convert-xpt-to-sas-file/m-p/395411#M95355</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-09-13T07:45:25Z</dc:date>
    </item>
  </channel>
</rss>

