<?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 Help required -Proc Import with csv file in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Help-required-Proc-Import-with-csv-file/m-p/193128#M48467</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;CSV file that I'm trying to read into SAS university edition contains 107 variables. The variable names start with var3 and end with var189 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I used the following code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc import datafile="/folders/myfolders/sample.csv" out=sample1&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; dbms=csv replace; getnames=yes; ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the variable names in the output data set change completely. The sequence of variable names start with var1 and ends with var189 but has 107 variables like the input CSV file.&lt;/P&gt;&lt;P&gt;I tested this using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc contents data=sample1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure as to why the variable names change. That is instead of var3 as the first variable name, it shows as var1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help to understand the reason and I tried changing the input file format, but I still come across the same problem with the variable names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bottom line is whatever variable names displayed in the input file should appear in the output dataset also.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Jun 2015 23:13:14 GMT</pubDate>
    <dc:creator>Sandyc</dc:creator>
    <dc:date>2015-06-30T23:13:14Z</dc:date>
    <item>
      <title>Help required -Proc Import with csv file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-required-Proc-Import-with-csv-file/m-p/193128#M48467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;CSV file that I'm trying to read into SAS university edition contains 107 variables. The variable names start with var3 and end with var189 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I used the following code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc import datafile="/folders/myfolders/sample.csv" out=sample1&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; dbms=csv replace; getnames=yes; ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the variable names in the output data set change completely. The sequence of variable names start with var1 and ends with var189 but has 107 variables like the input CSV file.&lt;/P&gt;&lt;P&gt;I tested this using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc contents data=sample1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure as to why the variable names change. That is instead of var3 as the first variable name, it shows as var1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help to understand the reason and I tried changing the input file format, but I still come across the same problem with the variable names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bottom line is whatever variable names displayed in the input file should appear in the output dataset also.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 23:13:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-required-Proc-Import-with-csv-file/m-p/193128#M48467</guid>
      <dc:creator>Sandyc</dc:creator>
      <dc:date>2015-06-30T23:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help required -Proc Import with csv file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-required-Proc-Import-with-csv-file/m-p/226959#M54131</link>
      <description>&lt;P&gt;In your csv file, are the variable names in the very first row? (or is there possibly a blank row in the file before the variable names?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2015 19:10:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-required-Proc-Import-with-csv-file/m-p/226959#M54131</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2015-09-23T19:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help required -Proc Import with csv file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-required-Proc-Import-with-csv-file/m-p/227016#M54137</link>
      <description>Can you post the first few lines of your file?</description>
      <pubDate>Thu, 24 Sep 2015 00:14:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-required-Proc-Import-with-csv-file/m-p/227016#M54137</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-09-24T00:14:03Z</dc:date>
    </item>
  </channel>
</rss>

