<?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: two questions about read data from a csv file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/two-questions-about-read-data-from-a-csv-file/m-p/742527#M232289</link>
    <description>&lt;P&gt;Thank you for your help.&lt;/P&gt;</description>
    <pubDate>Wed, 19 May 2021 23:25:20 GMT</pubDate>
    <dc:creator>tianerhu</dc:creator>
    <dc:date>2021-05-19T23:25:20Z</dc:date>
    <item>
      <title>two questions about read data from a csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/two-questions-about-read-data-from-a-csv-file/m-p/742512#M232277</link>
      <description>&lt;P&gt;the first question:&lt;/P&gt;
&lt;P&gt;how to read the data in the csv file which have variable names in the first row? like below :&lt;/P&gt;
&lt;P&gt;the second question:&lt;/P&gt;
&lt;P&gt;the 'Hire Date' variable, there is one blank in it , how to read ?&lt;/P&gt;
&lt;P&gt;Name,Hire Date,Company,Country,Date of Birth &lt;BR /&gt;Gisela S. Santos,8/12/17,Pede Nunc Sed Limited,Micronesia,8/21/1971 &lt;BR /&gt;Maxwell L. Cooley,9/4/17,A LLP,Somalia,4/30/1975 &lt;BR /&gt;Thane P. Obrien,10/28/17,Consectetuer Limited,Jamaica,4/23/1988 &lt;BR /&gt;Minerva C. Conley,1/5/18,Feugiat Tellus Lorem Institute,Fiji,2/18/1975 &lt;BR /&gt;Kylee R. Finch,10/31/17,Magna Incorporated,Myanmar,5/18/1973 &lt;BR /&gt;Calista F. Chambers,9/11/17,Facilisis Incorporated,Libya,3/4/1972 &lt;BR /&gt;Fuller X. Bradford,1/27/18,Morbi Incorporated,Saint Pierre and Miquelon,12/1/1976&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 21:17:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/two-questions-about-read-data-from-a-csv-file/m-p/742512#M232277</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-05-19T21:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: two questions about read data from a csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/two-questions-about-read-data-from-a-csv-file/m-p/742514#M232279</link>
      <description>&lt;P&gt;You use FIRSTOBS=2 in the INFILE statement to read over the header line.&lt;/P&gt;
&lt;P&gt;And&amp;nbsp;&lt;EM&gt;you&lt;/EM&gt; define the names of variables in the code (particularly the INPUT statement), so what is written in the header line is mostly irrelevant.&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 21:32:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/two-questions-about-read-data-from-a-csv-file/m-p/742514#M232279</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-05-19T21:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: two questions about read data from a csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/two-questions-about-read-data-from-a-csv-file/m-p/742515#M232280</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;how to read the data in the csv file which have variable names in the first row?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;FIRSTOBS=2 in the INFILE statement.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;there is one blank in it , how to read ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Look at the TRUNCOVER/MISSOVER options on the INFILE statement.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if the delimiter is properly specified in the middle it will read correctly, if it's at the end you need to ensure it doesn't try to read from a new line so the TRUNCOVER option is required. Your example doesn't show any missing data however so not sure what you're referring to.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Probably worth skimming the documentation to see what other options are available.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/n1rill4udj0tfun1fvce3j401plo.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/n1rill4udj0tfun1fvce3j401plo.htm&lt;/A&gt;&lt;/SPAN&gt;&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/268447"&gt;@tianerhu&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;the first question:&lt;/P&gt;
&lt;P&gt;how to read the data in the csv file which have variable names in the first row? like below :&lt;/P&gt;
&lt;P&gt;the second question:&lt;/P&gt;
&lt;P&gt;the 'Hire Date' variable, there is one blank in it , how to read ?&lt;/P&gt;
&lt;P&gt;Name,Hire Date,Company,Country,Date of Birth &lt;BR /&gt;Gisela S. Santos,8/12/17,Pede Nunc Sed Limited,Micronesia,8/21/1971 &lt;BR /&gt;Maxwell L. Cooley,9/4/17,A LLP,Somalia,4/30/1975 &lt;BR /&gt;Thane P. Obrien,10/28/17,Consectetuer Limited,Jamaica,4/23/1988 &lt;BR /&gt;Minerva C. Conley,1/5/18,Feugiat Tellus Lorem Institute,Fiji,2/18/1975 &lt;BR /&gt;Kylee R. Finch,10/31/17,Magna Incorporated,Myanmar,5/18/1973 &lt;BR /&gt;Calista F. Chambers,9/11/17,Facilisis Incorporated,Libya,3/4/1972 &lt;BR /&gt;Fuller X. Bradford,1/27/18,Morbi Incorporated,Saint Pierre and Miquelon,12/1/1976&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 21:43:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/two-questions-about-read-data-from-a-csv-file/m-p/742515#M232280</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-05-19T21:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: two questions about read data from a csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/two-questions-about-read-data-from-a-csv-file/m-p/742527#M232289</link>
      <description>&lt;P&gt;Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 23:25:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/two-questions-about-read-data-from-a-csv-file/m-p/742527#M232289</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-05-19T23:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: two questions about read data from a csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/two-questions-about-read-data-from-a-csv-file/m-p/742528#M232290</link>
      <description>&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 23:25:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/two-questions-about-read-data-from-a-csv-file/m-p/742528#M232290</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-05-19T23:25:57Z</dc:date>
    </item>
  </channel>
</rss>

