<?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: How to Proc Import a csv file with variable names on row 3 and data beginning on row 9? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Import-a-csv-file-with-variable-names-on-row-3-and/m-p/940013#M369027</link>
    <description>&lt;P&gt;Did the source of that file provide an adequate contents description to write a data step? Such as column meaning, ranges of values, layout such as currency or dates, maximum length of character variables?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, I would write a data step and use the INFILE option Firstobs=9 to skip to the first line of the data wanted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a minimum you want to include a Guessingrows=max; statement if using proc import. Otherwise the number of rows examined may result in many mismatches of variable types or truncated values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regardless, you want to save the generated data step in the log as you may need to make changes that aren't possible directly with Proc Import and it is often easier to modify some working code (the generated data step) than to start from scratch.&lt;/P&gt;
&lt;P&gt;Proc import will treat any series of digits only as a number. Which leads to loss of significant leading zeroes in thing like bank accounts or routing numbers and similar.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2024 21:39:29 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2024-08-19T21:39:29Z</dc:date>
    <item>
      <title>How to Proc Import a csv file with variable names on row 3 and data beginning on row 9?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Import-a-csv-file-with-variable-names-on-row-3-and/m-p/939926#M368994</link>
      <description>&lt;P&gt;I want to import a csv file with 90 variables (columns) and&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;gt;100K rows.&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;I want to assign row 3 as containing the variable names.&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;The data rows start on row 9.&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;How can I do this with Proc Import?&lt;/P&gt;
&lt;P&gt;Thanks in advance...&lt;/P&gt;
&lt;P&gt;Gene&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 16:47:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Import-a-csv-file-with-variable-names-on-row-3-and/m-p/939926#M368994</guid>
      <dc:creator>genemroz</dc:creator>
      <dc:date>2024-08-19T16:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to Proc Import a csv file with variable names on row 3 and data beginning on row 9?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Import-a-csv-file-with-variable-names-on-row-3-and/m-p/939927#M368995</link>
      <description>&lt;P&gt;Easiest thing to do is delete rows 1 and 2 and delete rows 4-8.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 16:52:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Import-a-csv-file-with-variable-names-on-row-3-and/m-p/939927#M368995</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-08-19T16:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Proc Import a csv file with variable names on row 3 and data beginning on row 9?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Import-a-csv-file-with-variable-names-on-row-3-and/m-p/940013#M369027</link>
      <description>&lt;P&gt;Did the source of that file provide an adequate contents description to write a data step? Such as column meaning, ranges of values, layout such as currency or dates, maximum length of character variables?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, I would write a data step and use the INFILE option Firstobs=9 to skip to the first line of the data wanted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a minimum you want to include a Guessingrows=max; statement if using proc import. Otherwise the number of rows examined may result in many mismatches of variable types or truncated values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regardless, you want to save the generated data step in the log as you may need to make changes that aren't possible directly with Proc Import and it is often easier to modify some working code (the generated data step) than to start from scratch.&lt;/P&gt;
&lt;P&gt;Proc import will treat any series of digits only as a number. Which leads to loss of significant leading zeroes in thing like bank accounts or routing numbers and similar.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 21:39:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Import-a-csv-file-with-variable-names-on-row-3-and/m-p/940013#M369027</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-08-19T21:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to Proc Import a csv file with variable names on row 3 and data beginning on row 9?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Import-a-csv-file-with-variable-names-on-row-3-and/m-p/940016#M369028</link>
      <description>&lt;P&gt;If you delete row 2, GETNAMES = YES will work. Then specify DATAROWS = 8 to identify which row to starting read your data from, since you deleted a line.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 22:15:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Import-a-csv-file-with-variable-names-on-row-3-and/m-p/940016#M369028</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-08-19T22:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Proc Import a csv file with variable names on row 3 and data beginning on row 9?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Import-a-csv-file-with-variable-names-on-row-3-and/m-p/940017#M369029</link>
      <description>This turned out to be the easiest approach.  Thanks to all for responding with suggestions.</description>
      <pubDate>Mon, 19 Aug 2024 22:16:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Import-a-csv-file-with-variable-names-on-row-3-and/m-p/940017#M369029</guid>
      <dc:creator>genemroz</dc:creator>
      <dc:date>2024-08-19T22:16:57Z</dc:date>
    </item>
  </channel>
</rss>

