<?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 Importing CSV file error in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/461899#M5500</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I'm seeing the following error message when I try to import a csv file that exists under "myfolders". I followed the basic instructions for importing a CSV file. Am I missing something here?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: File WORK.IMPORT.DATA does not exist.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 14 May 2018 00:04:55 GMT</pubDate>
    <dc:creator>mj8000</dc:creator>
    <dc:date>2018-05-14T00:04:55Z</dc:date>
    <item>
      <title>Importing CSV file error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/461899#M5500</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I'm seeing the following error message when I try to import a csv file that exists under "myfolders". I followed the basic instructions for importing a CSV file. Am I missing something here?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: File WORK.IMPORT.DATA does not exist.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 00:04:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/461899#M5500</guid>
      <dc:creator>mj8000</dc:creator>
      <dc:date>2018-05-14T00:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV file error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/461907#M5501</link>
      <description>&lt;P&gt;Post both the code you ran and your log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 01:07:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/461907#M5501</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-05-14T01:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV file error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/461910#M5503</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="3"&gt;*&amp;nbsp; I am strongly agree that individual need to see what you are getting errors so please share with code and log screen shot&amp;nbsp;at first place.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="3"&gt;* for your reference here's code which may helps you out....&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc import datafile="location where your file present / filename.csv"&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; out=dsn&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dbms=csv&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;replace;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;SHAH&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 02:00:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/461910#M5503</guid>
      <dc:creator>shahparth260</dc:creator>
      <dc:date>2018-05-14T02:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV file error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/461930#M5504</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Generated Code (IMPORT) */&lt;BR /&gt;/* Source File: tl1_mock.csv */&lt;BR /&gt;/* Source Path: /folders/myfolders */&lt;BR /&gt;/* Code generated on: 5/14/18, 1:17 AM */&lt;/P&gt;&lt;P&gt;%web_drop_table(WORK.IMPORT);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FILENAME REFFILE '/folders/myfolders/tl1_mock.csv';&lt;/P&gt;&lt;P&gt;PROC IMPORT DATAFILE=REFFILE&lt;BR /&gt;DBMS=CSV&lt;BR /&gt;OUT=WORK.IMPORT;&lt;BR /&gt;GETNAMES=YES;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;PROC CONTENTS DATA=WORK.IMPORT; RUN;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%web_open_table(WORK.IMPORT);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Log:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;73 /* Generated Code (IMPORT) */&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74 /* Source File: tl1_mock.csv */&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75 /* Source Path: /folders/myfolders */&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;76 /* Code generated on: 5/14/18, 1:17 AM */&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;77&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;78 %web_drop_table(WORK.IMPORT);&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;79&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;80&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;81 FILENAME REFFILE '/folders/myfolders/tl1_mock.csv';&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;82&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;83 PROC IMPORT DATAFILE=REFFILE&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;84 DBMS=CSV&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;85 OUT=WORK.IMPORT;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;86 GETNAMES=YES;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;87 RUN;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;WORK.PARMS.PARMS.SLIST.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Unable to sample external file, no data in first 5 records.&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Import unsuccessful. See SAS Log for details.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.44 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.21 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;88&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;89 PROC CONTENTS DATA=WORK.IMPORT; RUN;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: File WORK.IMPORT.DATA does not exist.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Statements not processed because of errors noted above.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE CONTENTS used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;90&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;91&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;92 %web_open_table(WORK.IMPORT);&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;93&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;94 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;107&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 14 May 2018 06:18:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/461930#M5504</guid>
      <dc:creator>mj8000</dc:creator>
      <dc:date>2018-05-14T06:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV file error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/461932#M5505</link>
      <description>&lt;P&gt;check your csv file once again make sure you dont have data in first few records&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 06:28:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/461932#M5505</guid>
      <dc:creator>shahparth260</dc:creator>
      <dc:date>2018-05-14T06:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV file error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/461949#M5507</link>
      <description>&lt;P&gt;When something unexpected happens, &lt;EM&gt;each and every &lt;/EM&gt;line of the log is important. The most important one here is this:&lt;/P&gt;
&lt;PRE&gt;Unable to sample external file, no data in first 5 records.&lt;/PRE&gt;
&lt;P&gt;Inspect your csv file for where data starts. If the csv files you get exhibit this kind of behaviour regularly, you should write your custom data step so that it takes this into account (proc import won't get you consistent results).&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 08:05:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/461949#M5507</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-05-14T08:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV file error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/462096#M5509</link>
      <description>&lt;P&gt;Thank you for the reply. If I test with a sample CSV file generated from the SASHELP -&amp;gt; CARS library, I still see the same error. Is my CSV file supposed to have data in the first 5 lines?&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 15:37:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/462096#M5509</guid>
      <dc:creator>mj8000</dc:creator>
      <dc:date>2018-05-14T15:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV file error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/462108#M5510</link>
      <description>&lt;P&gt;You're getting the odd message because your csv file's records end with CR rather than CRLF .. at least with the cars.csv file you posted. The following would correct for that:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FILENAME REFFILE '/folders/myfolders/cars.csv';
filename csv temp;

data _null_;
  infile reffile termstr=cr;
  file csv recfm=n;
  input;
  put _infile_ '0A'x;
run;

PROC IMPORT DATAFILE=csv
 DBMS=CSV
 OUT=WORK.IMPORT
 replace;
 GETNAMES=YES;
RUN;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 16:02:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/462108#M5510</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-05-14T16:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV file error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/462117#M5511</link>
      <description>&lt;P&gt;For my own understanding and for future reference:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CR and LF are control characters, respectively coded&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;0x0D&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;(13 decimal) and&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;0x0A&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;(10 decimal).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CRLF (Windows) was expected, but my csv file was using CR (as I'm on a Macintosh). As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;suggested, appending the "LF" part did the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks to everyone for the help and support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Related link:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/1552749/difference-between-cr-lf-lf-and-cr-line-break-types" target="_blank"&gt;https://stackoverflow.com/questions/1552749/difference-between-cr-lf-lf-and-cr-line-break-types&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 16:24:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/462117#M5511</guid>
      <dc:creator>mj8000</dc:creator>
      <dc:date>2018-05-14T16:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV file error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/462118#M5512</link>
      <description>&lt;P&gt;Wow! You're Life saver&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am also&amp;nbsp;on learning curve.&amp;nbsp;Thanks to having you in SAS community.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 16:36:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/462118#M5512</guid>
      <dc:creator>shahparth260</dc:creator>
      <dc:date>2018-05-14T16:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Importing CSV file error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/462374#M5516</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/209871"&gt;@mj8000&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;For my own understanding and for future reference:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;CR and LF are control characters, respectively coded&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;0x0D&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;(13 decimal) and&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;0x0A&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;(10 decimal).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CRLF (Windows) was expected, but my csv file was using CR (as I'm on a Macintosh). As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;suggested, appending the "LF" part did the trick.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks to everyone for the help and support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Related link:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/1552749/difference-between-cr-lf-lf-and-cr-line-break-types" target="_blank"&gt;https://stackoverflow.com/questions/1552749/difference-between-cr-lf-lf-and-cr-line-break-types&lt;/A&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A couple of points that can help make this easier.&lt;/P&gt;
&lt;P&gt;First as far as I know it is only Excel on Mac that is still confused and thinks that Mac's should use CR only as end of line markers. Most other programs understand that MAC OS is now a unix variant and the lines should end with LF instead.&amp;nbsp; If you check the options when saving a spreadsheet to a delimited file there are options that create the file using a more universal end of line setting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second you can use the TERMSTR option in SAS to tell it that your file is using only CR as the end of line marker.&amp;nbsp; To use it with PROC IMPORT you will need to use a FILENAME statement and point PROC IMPORT at the fileref you have defined by the FILENAME statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FILENAME csv '/folders/myfolders/cars.csv' termstr=cr;
PROC IMPORT DATAFILE=csv
 DBMS=CSV
 OUT=WORK.IMPORT
 replace;
 GETNAMES=YES;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 May 2018 14:49:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Importing-CSV-file-error/m-p/462374#M5516</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-05-15T14:49:43Z</dc:date>
    </item>
  </channel>
</rss>

