<?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: INFILE command with a .csv file in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/INFILE-command-with-a-csv-file/m-p/276044#M58615</link>
    <description>&lt;P&gt;Using Formatted Input with a delimited file is not compatable and will not give correct result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input Ref_Date &lt;FONT color="#FF0000"&gt;&lt;U&gt;$7.&lt;/U&gt;&lt;/FONT&gt; GEO &lt;FONT color="#FF0000"&gt;$12.&lt;/FONT&gt; 'Geographical Classification'n &lt;FONT color="#FF0000"&gt;$2.&lt;/FONT&gt; SIZE Description Vector Coordinate Value;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Remove those INFORMAT specifications from the INPUT statement. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Delimited files use LIST input.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jun 2016 20:10:52 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2016-06-08T20:10:52Z</dc:date>
    <item>
      <title>INFILE command with a .csv file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/INFILE-command-with-a-csv-file/m-p/276015#M58609</link>
      <description>&lt;P&gt;I have run the following code in order to import a .csv file of data (published by Statistics Canada) into a SAS dataset:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA WORK.Firm_count_Dec_2015;&lt;BR /&gt;format Ref_Date $7. GEO $12. 'Geographical Classification'n $2. SIZE $2. Description $24. Vector $9. Coordinate $8. Value 6.;&lt;BR /&gt;infile "c:\user\homareau\PredictiveModels\FirmCounts\Firm_count_Dec_2015.csv" firstobs=2 dlm=',' Missover DSD;&lt;BR /&gt;informat Ref_Date $7. GEO $12. 'Geographical Classification'n $2. SIZE $2. Description $24. Vector $9. Coordinate $8. Value 6.;&lt;BR /&gt;input Ref_Date $7. GEO $12. 'Geographical Classification'n $2. SIZE Description Vector Coordinate Value;&lt;BR /&gt;label Ref_Date = 'Date'&lt;BR /&gt;GEO = 'Prov_Name'&lt;BR /&gt;'Geographical Classification'n = 'Prov_Code'&lt;BR /&gt;SIZE = 'Firm_Size'&lt;BR /&gt;Description = 'NAICS_Description'&lt;BR /&gt;Vector = 'CANSIM_V_Code'&lt;BR /&gt;Coordinate = 'Coordinate'&lt;BR /&gt;Value = 'Count';&lt;BR /&gt;drop Vector Coordinate;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However the data from the .csv file are not importing properly. &amp;nbsp;The attachment shows the end result. &amp;nbsp;It has to do with the delimiter but I thought my code was correct. &amp;nbsp;What am I missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 16:05:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/INFILE-command-with-a-csv-file/m-p/276015#M58609</guid>
      <dc:creator>Jack1</dc:creator>
      <dc:date>2016-06-08T16:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: INFILE command with a .csv file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/INFILE-command-with-a-csv-file/m-p/276029#M58611</link>
      <description>Hi, it would be very helpful to know whether you got errors in the log or to see a small sample of the CSV file.&lt;BR /&gt;cynthia</description>
      <pubDate>Wed, 08 Jun 2016 17:06:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/INFILE-command-with-a-csv-file/m-p/276029#M58611</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-06-08T17:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: INFILE command with a .csv file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/INFILE-command-with-a-csv-file/m-p/276032#M58612</link>
      <description>&lt;P&gt;Please describe what is "wrong". Also, at least on my monitor you screen capture is too fuzzy to read.&lt;/P&gt;
&lt;P&gt;It may help to post some lines of raw data and print results.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 17:16:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/INFILE-command-with-a-csv-file/m-p/276032#M58612</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-06-08T17:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: INFILE command with a .csv file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/INFILE-command-with-a-csv-file/m-p/276035#M58613</link>
      <description>&lt;P&gt;Figured it out. &amp;nbsp;Thanks...&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 17:27:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/INFILE-command-with-a-csv-file/m-p/276035#M58613</guid>
      <dc:creator>Jack1</dc:creator>
      <dc:date>2016-06-08T17:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: INFILE command with a .csv file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/INFILE-command-with-a-csv-file/m-p/276040#M58614</link>
      <description>&lt;P&gt;Please share your solution so that anyone that finds this thead from a search has a solution to go with the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 17:41:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/INFILE-command-with-a-csv-file/m-p/276040#M58614</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-06-08T17:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: INFILE command with a .csv file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/INFILE-command-with-a-csv-file/m-p/276044#M58615</link>
      <description>&lt;P&gt;Using Formatted Input with a delimited file is not compatable and will not give correct result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input Ref_Date &lt;FONT color="#FF0000"&gt;&lt;U&gt;$7.&lt;/U&gt;&lt;/FONT&gt; GEO &lt;FONT color="#FF0000"&gt;$12.&lt;/FONT&gt; 'Geographical Classification'n &lt;FONT color="#FF0000"&gt;$2.&lt;/FONT&gt; SIZE Description Vector Coordinate Value;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Remove those INFORMAT specifications from the INPUT statement. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Delimited files use LIST input.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 20:10:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/INFILE-command-with-a-csv-file/m-p/276044#M58615</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-06-08T20:10:52Z</dc:date>
    </item>
  </channel>
</rss>

