<?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: Import a csv file and then export a sas dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480023#M286583</link>
    <description>&lt;P&gt;I apologize for the missing quotes and extra semi-colon in the post. However, the code has proper quotes and semi-colon but it still does throw up errors.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jul 2018 18:57:19 GMT</pubDate>
    <dc:creator>SteelersPitts</dc:creator>
    <dc:date>2018-07-20T18:57:19Z</dc:date>
    <item>
      <title>Import a csv file and then export a sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480017#M286581</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to import a csv file and then export a sas dataset as on output but I'm running into issues. Can anyone let me know where I'm going wrong? My code logic is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Import:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Proc Import out=xyz&lt;/P&gt;&lt;P&gt;datafile='c:\User\Folder\File_Abc.csv'&lt;/P&gt;&lt;P&gt;DBMS =csv replace;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;SAS Dataset export&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Libname out 'c:\user\Desktop';&lt;/P&gt;&lt;P&gt;data out.test;&lt;/P&gt;&lt;P&gt;set xyz;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm receiving an error saying "set is not allowed in the data statement".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone let me know how I export the sas dataset here? Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 18:56:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480017#M286581</guid>
      <dc:creator>SteelersPitts</dc:creator>
      <dc:date>2018-07-20T18:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Import a csv file and then export a sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480020#M286582</link>
      <description>&lt;P&gt;You need to close your quotation marks&amp;nbsp;for both times you use it. Also, you had an extra semicolon in the proc import statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc Import out=xyz
   datafile='c:\User\Folder\File_Abc.csv'
   DBMS =csv replace;
run;

 


Libname out 'c:\user\Desktop';

data out.test;
set xyz;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jul 2018 18:48:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480020#M286582</guid>
      <dc:creator>Urban_Science</dc:creator>
      <dc:date>2018-07-20T18:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Import a csv file and then export a sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480023#M286583</link>
      <description>&lt;P&gt;I apologize for the missing quotes and extra semi-colon in the post. However, the code has proper quotes and semi-colon but it still does throw up errors.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 18:57:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480023#M286583</guid>
      <dc:creator>SteelersPitts</dc:creator>
      <dc:date>2018-07-20T18:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Import a csv file and then export a sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480027#M286584</link>
      <description>Without seeing the errors, my guess is that the paths are wrong. C:\Users\&amp;lt;User Name&amp;gt;\&lt;BR /&gt;But that could be an editing mistake when posting.</description>
      <pubDate>Fri, 20 Jul 2018 19:01:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480027#M286584</guid>
      <dc:creator>Urban_Science</dc:creator>
      <dc:date>2018-07-20T19:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Import a csv file and then export a sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480030#M286585</link>
      <description>&lt;P&gt;Post the full log from the code you're running.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/175426"&gt;@SteelersPitts&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to import a csv file and then export a sas dataset as on output but I'm running into issues. Can anyone let me know where I'm going wrong? My code logic is as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Import:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Proc Import out=xyz&lt;/P&gt;
&lt;P&gt;datafile='c:\User\Folder\File_Abc.csv'&lt;/P&gt;
&lt;P&gt;DBMS =csv replace;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;SAS Dataset export&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Libname out 'c:\user\Desktop';&lt;/P&gt;
&lt;P&gt;data out.test;&lt;/P&gt;
&lt;P&gt;set xyz;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm receiving an error saying "set is not allowed in the data statement".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone let me know how I export the sas dataset here? Thank you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 19:02:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480030#M286585</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-20T19:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Import a csv file and then export a sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480035#M286586</link>
      <description>I didn't see that you edited your post. Nevermind with the path. My new guess is that you might have forgotten a semicolon after data out.test</description>
      <pubDate>Fri, 20 Jul 2018 19:04:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480035#M286586</guid>
      <dc:creator>Urban_Science</dc:creator>
      <dc:date>2018-07-20T19:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Import a csv file and then export a sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480058#M286587</link>
      <description>&lt;P&gt;My bad! Code is working fine now. There was a missing semi-colon. Thanks everyone.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 19:57:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-a-csv-file-and-then-export-a-sas-dataset/m-p/480058#M286587</guid>
      <dc:creator>SteelersPitts</dc:creator>
      <dc:date>2018-07-20T19:57:12Z</dc:date>
    </item>
  </channel>
</rss>

