<?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 Exporting a SAS data set in SAS format in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Exporting-a-SAS-data-set-in-SAS-format/m-p/161012#M41909</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I would like to export a SAS data set keeping it in SAS format (sas7bdat). I have tried variations of PROC EXPORT below and none seem to work. Has anyone used the CPORT proc for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc export data=work.surrenderTprCount&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; outfile='F:\MetricFiles\9_2013'&lt;/P&gt;&lt;P&gt;DBMS=sas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; replace;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Feb 2014 23:59:05 GMT</pubDate>
    <dc:creator>Paul_NYS</dc:creator>
    <dc:date>2014-02-03T23:59:05Z</dc:date>
    <item>
      <title>Exporting a SAS data set in SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Exporting-a-SAS-data-set-in-SAS-format/m-p/161012#M41909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I would like to export a SAS data set keeping it in SAS format (sas7bdat). I have tried variations of PROC EXPORT below and none seem to work. Has anyone used the CPORT proc for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc export data=work.surrenderTprCount&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; outfile='F:\MetricFiles\9_2013'&lt;/P&gt;&lt;P&gt;DBMS=sas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; replace;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 23:59:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Exporting-a-SAS-data-set-in-SAS-format/m-p/161012#M41909</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2014-02-03T23:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting a SAS data set in SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Exporting-a-SAS-data-set-in-SAS-format/m-p/161013#M41910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want to make a copy in a different folder or on a different drive with the same data set name?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA "samedrive:\NEWfoldername\samedatasetname";&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET "samedrive:\OLDfoldername\samedatasetname";&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA "Newdrive:\foldername\samedatasetname";&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET "Oldrive:\foldername\samedatasetname";&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could use two LIBNAME statements instead (can be useful for lengthy programs with many data set references or if you move your files around often) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIBNAME oldlocation "C:\myfolder\sas\work";&lt;/P&gt;&lt;P&gt;LIBNAME newlocation "F:\MetricFiles";&lt;/P&gt;&lt;P&gt;DATA newlocation.samedatasetname;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET oldlocation.samedatasetname;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or just use windows explorer (MY Computer or Computer) to just move or copy the file directly (click and drag).&amp;nbsp; You won't mess up a sasb7dat file by moving it.&amp;nbsp; SASb7dat files don't normally contain their own location within themselves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are just trying to rename the data set name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA libraryname.NEWname;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET libraryname.OLDname;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW.&amp;nbsp; "work." is the default location, you don't have to specify that.&amp;nbsp; ie:&amp;nbsp; data=work.surrenderTprCount is the same as data=surrenderTprCount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS, PROC IMPORT, EXPORT, CPORT, CINPORT are intended to change the format.&amp;nbsp; They have plenty of traps waiting for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 01:13:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Exporting-a-SAS-data-set-in-SAS-format/m-p/161013#M41910</guid>
      <dc:creator>rickpaulos</dc:creator>
      <dc:date>2014-02-04T01:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting a SAS data set in SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Exporting-a-SAS-data-set-in-SAS-format/m-p/161014#M41911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rick. I wasn't thinking..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 12:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Exporting-a-SAS-data-set-in-SAS-format/m-p/161014#M41911</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2014-02-04T12:51:20Z</dc:date>
    </item>
  </channel>
</rss>

