<?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 New to SAS, keep getting the same error when importing csv into SAS on demand for academics in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900069#M40090</link>
    <description>&lt;P&gt;Currently trying to import a CSV file from Excel using this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc import datafile = "/home/u63565620/Datasets/politics.csv" out = Assignment3;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This step usually goes fine, but I've been getting an error of:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;PTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;proc import datafile = "/home/u63565620/Datasets/politics.csv" out = Assignment3;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;run;&lt;/DIV&gt;&lt;DIV class=""&gt;(this is my only line of code in the program so far)&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: Import canceled. Output dataset WORK.ASSIGNMENT3 already exists. Specify REPLACE option to overwrite it.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;The real problem is when I go to just print that data using:&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Proc print data = politics;&lt;BR /&gt;Run;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;I get this error:&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;Proc print data = politics;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: File WORK.POLITICS.DATA does not exist.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;Run;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;I've already imported the file into SAS into a folder called Datasets, so I'm not sure what the issue is&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Thu, 26 Oct 2023 03:58:36 GMT</pubDate>
    <dc:creator>prizedeye824</dc:creator>
    <dc:date>2023-10-26T03:58:36Z</dc:date>
    <item>
      <title>New to SAS, keep getting the same error when importing csv into SAS on demand for academics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900069#M40090</link>
      <description>&lt;P&gt;Currently trying to import a CSV file from Excel using this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc import datafile = "/home/u63565620/Datasets/politics.csv" out = Assignment3;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This step usually goes fine, but I've been getting an error of:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;PTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;proc import datafile = "/home/u63565620/Datasets/politics.csv" out = Assignment3;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;run;&lt;/DIV&gt;&lt;DIV class=""&gt;(this is my only line of code in the program so far)&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: Import canceled. Output dataset WORK.ASSIGNMENT3 already exists. Specify REPLACE option to overwrite it.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;The real problem is when I go to just print that data using:&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Proc print data = politics;&lt;BR /&gt;Run;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;I get this error:&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;Proc print data = politics;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: File WORK.POLITICS.DATA does not exist.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;Run;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;I've already imported the file into SAS into a folder called Datasets, so I'm not sure what the issue is&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Oct 2023 03:58:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900069#M40090</guid>
      <dc:creator>prizedeye824</dc:creator>
      <dc:date>2023-10-26T03:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: New to SAS, keep getting the same error when importing csv into SAS on demand for academics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900071#M40091</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Like the SAS Log tells you: &lt;STRONG&gt;Specify REPLACE option&lt;/STRONG&gt; to overwrite it. Try:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import 
  datafile = "/home/u63565620/Datasets/politics.csv" 
  out = work.Assignment3
  dbms=csv
  replace
  ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;I've already imported the file into SAS into a folder called Datasets, so I'm not sure what the issue is&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;That's the .csv file. Proc Import then reads this external text file into SAS session specific table work.assignment3 (=the table you're trying to print must exist under library WORK). WORK and all its content gets deleted when you end a SAS session.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 04:10:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900071#M40091</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-10-26T04:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: New to SAS, keep getting the same error when importing csv into SAS on demand for academics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900081#M40092</link>
      <description>&lt;P&gt;Proc import would create the dataset work.Assignment3, but it is already there, you have not used the replace option so proc import does not replace the existing dataset.&lt;/P&gt;
&lt;P&gt;In the next step you want to print work.politics a non-existing dataset. If you want to print the imported data, you have to use the name specified in the import procedure.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 06:08:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900081#M40092</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2023-10-26T06:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: New to SAS, keep getting the same error when importing csv into SAS on demand for academics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900119#M40096</link>
      <description>&lt;P&gt;Thank you so much! how would I print or use a test like the chisq test after this though? I added the replace statement and now that step is working fine, but the print step still isn't working. I don't think I'm creating the data set from the imported csv correctly, but I'm not sure how to do it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to separate my data from the csv into ideological groups (the data is about political party affiliation) and this is the code I'm using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC IMPORT FILE="/home/u63565620/Datasets/politics.csv"&lt;BR /&gt;OUT=WORK.politics&lt;BR /&gt;DBMS=CSV&lt;BR /&gt;replace;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;Data politics;&lt;BR /&gt;Set politics2;&lt;BR /&gt;Length opinion $15;&lt;BR /&gt;If ideology in (1,2) then opinion = “Liberal”;&lt;BR /&gt;If ideology in (3,4,5) then opinion = “Moderate”;&lt;BR /&gt;If ideology in (6,7) then opinion = “Conservative”;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it just created extra empty columns for opinion, liberal, moderate, and conservative without actually sorting the data. Am I calling the data incorrectly? And why does it make new columns for each ideology instead of sorting into an opinion column with the ideology being the label within the column?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 12:27:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900119#M40096</guid>
      <dc:creator>prizedeye824</dc:creator>
      <dc:date>2023-10-26T12:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: New to SAS, keep getting the same error when importing csv into SAS on demand for academics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900120#M40097</link>
      <description>&lt;P&gt;In the PROC IMPORT step, you create the dataset WORK.POLITICS, but then you overwrite it in the DATA step.&lt;/P&gt;
&lt;P&gt;A dataset named in the DATA statement is created, a dataset named in the SET statement is read.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 12:34:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900120#M40097</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-10-26T12:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: New to SAS, keep getting the same error when importing csv into SAS on demand for academics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900125#M40098</link>
      <description>&lt;P&gt;Ohh okay, I think I'm starting to understand. Thank you so much! How do I call the dataset when I'm sorting it then?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 12:50:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900125#M40098</guid>
      <dc:creator>prizedeye824</dc:creator>
      <dc:date>2023-10-26T12:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: New to SAS, keep getting the same error when importing csv into SAS on demand for academics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900127#M40099</link>
      <description>&lt;P&gt;With the DATA= option of the PROC SORT&amp;nbsp; statement of the SORT procedure.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 13:21:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900127#M40099</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-10-26T13:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: New to SAS, keep getting the same error when importing csv into SAS on demand for academics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900151#M40103</link>
      <description>&lt;P&gt;Why would expect anything to be "sorted" with the code shown? There is nothing in your code that uses or implies a "sorting" step was desired or attempted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: This sort of doesn't make sense:&lt;/P&gt;
&lt;P&gt;"created extra empty columns for opinion, liberal, moderate, and conservative"&lt;/P&gt;
&lt;P&gt;There is nothing in the shown code that would create "columns" (please think VARIABLE because that is not order dependent like a "column") .&lt;/P&gt;
&lt;P&gt;HOWEVER since you used the name POLITICS on the DATA statement that is the resulting name of the data set. If the data set POLITICS2 did not exist then you 1) used an empty source for data on the Set statement and your log would show something like&lt;/P&gt;
&lt;PRE&gt;183  data politics;
184     set politics2;
ERROR: File WORK.POLITICS2.DATA does not exist.
185  run;
&lt;/PRE&gt;
&lt;P&gt;2)If you did not get that error then somewhere you had a data set Politcs2 and we have no clue what may have been in it but you replaced Politics with Politics2 contents, possibly adding Opinion. Since you have not shown anything related to creating Politics2 we have no way of knowing what was in it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 14:45:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900151#M40103</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-10-26T14:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: New to SAS, keep getting the same error when importing csv into SAS on demand for academics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900160#M40106</link>
      <description>Hi:&lt;BR /&gt;  All of these topics -- how to read a CSV file, how to use REPLACE, the difference between the DATA statement and a SET statement and how to use PROC SORT, PROC PRINT, PROC FREQ, and some other basic procedures are all covered in the free Programming 1 class (did I mention it is Free?) You can activate the free class using the Get Started button on this site: &lt;A href="https://www.sas.com/en_us/training/offers/free-training.html" target="_blank"&gt;https://www.sas.com/en_us/training/offers/free-training.html&lt;/A&gt; &lt;BR /&gt;Cynthia&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Oct 2023 15:39:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900160#M40106</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-10-26T15:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: New to SAS, keep getting the same error when importing csv into SAS on demand for academics</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900163#M40107</link>
      <description>Hi, try to add the option "replace" in proc import because the file WORK.ASSIGNMENT3 already exists, you need the option to overwrite it</description>
      <pubDate>Thu, 26 Oct 2023 15:53:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-to-SAS-keep-getting-the-same-error-when-importing-csv-into/m-p/900163#M40107</guid>
      <dc:creator>Dnka</dc:creator>
      <dc:date>2023-10-26T15:53:14Z</dc:date>
    </item>
  </channel>
</rss>

