<?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: Renaming Column during Proc Import in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/8647#M407</link>
    <description>Even though I like coding a lot I would use Enterprise Guide for such a task (if it's a once off job).&lt;BR /&gt;
&lt;BR /&gt;
The import wizard creates all the code you need and you can also change column names and attributes in one of the steps (think it's step 3).&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick</description>
    <pubDate>Mon, 26 Apr 2010 14:02:19 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2010-04-26T14:02:19Z</dc:date>
    <item>
      <title>Renaming Column during Proc Import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/8643#M403</link>
      <description>Hi, &lt;BR /&gt;
&lt;BR /&gt;
 I am having a big dataset with more than 50+ columns in Excel format. Column names are perfect but bit complicated so I thought of renaming the column name. &lt;BR /&gt;
&lt;BR /&gt;
Can we rename column during the Proc Import procedure. Or do I need to create new dataset and use rename keyword ? &lt;BR /&gt;
&lt;BR /&gt;
Please let me know and thanks in advance.</description>
      <pubDate>Fri, 23 Apr 2010 03:26:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/8643#M403</guid>
      <dc:creator>Pritish</dc:creator>
      <dc:date>2010-04-23T03:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Column during Proc Import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/8644#M404</link>
      <description>Check this &lt;BR /&gt;
&lt;BR /&gt;
proc import &lt;BR /&gt;
      datafile="&amp;amp;ExcelFile" &lt;BR /&gt;
      out=ExcelDataSet ( rename=Col1=ColumnOne) &lt;BR /&gt;
      dbms=EXCEL;&lt;BR /&gt;
     DBSASLABEL=NO; &lt;BR /&gt;
run;</description>
      <pubDate>Fri, 23 Apr 2010 05:58:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/8644#M404</guid>
      <dc:creator>DataShare</dc:creator>
      <dc:date>2010-04-23T05:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Column during Proc Import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/8645#M405</link>
      <description>Hi, &lt;BR /&gt;
&lt;BR /&gt;
 I tried to use the code you provided. But it seems that there is no keyword DBSASLABEL in SAS. Are you refering to the keyword GetNames ?</description>
      <pubDate>Fri, 23 Apr 2010 17:53:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/8645#M405</guid>
      <dc:creator>Pritish</dc:creator>
      <dc:date>2010-04-23T17:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Column during Proc Import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/8646#M406</link>
      <description>Are you trying this with DBMS=EXCEL ?</description>
      <pubDate>Mon, 26 Apr 2010 13:21:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/8646#M406</guid>
      <dc:creator>DataShare</dc:creator>
      <dc:date>2010-04-26T13:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Column during Proc Import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/8647#M407</link>
      <description>Even though I like coding a lot I would use Enterprise Guide for such a task (if it's a once off job).&lt;BR /&gt;
&lt;BR /&gt;
The import wizard creates all the code you need and you can also change column names and attributes in one of the steps (think it's step 3).&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick</description>
      <pubDate>Mon, 26 Apr 2010 14:02:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/8647#M407</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-04-26T14:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Column during Proc Import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/286321#M59493</link>
      <description>&lt;P&gt;you can simply use rename option , check this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc import datafile="&amp;amp;file"&lt;BR /&gt; out=want(rename=(col11=new_var col22=new_var2))&lt;BR /&gt; dbms=xlsx replace;&lt;BR /&gt; getnames=yes;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2016 04:50:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/286321#M59493</guid>
      <dc:creator>LittlesasMaster</dc:creator>
      <dc:date>2016-07-22T04:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Column during Proc Import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/444931#M69394</link>
      <description>&lt;P&gt;So it seems like by using the "GETNAMES = YES" option, I was forcing SAS to create silly names that I was unable to reference. I was being silly, an easy work around was to change GETNAMES to NO, and then just rename the columns manually (there were only 26 columns, so it wasn't too bad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks to everyone for their input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 20:32:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/444931#M69394</guid>
      <dc:creator>MikeFranz</dc:creator>
      <dc:date>2018-03-12T20:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Column during Proc Import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/537912#M74019</link>
      <description>&lt;P&gt;You can do this inline with the PROC IMPORT statement if you would like to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the OUT line:&lt;/P&gt;&lt;P&gt;&amp;nbsp; OUT=Library.Name (rename=VAR1=Column1 rename=VAR2=Column2 ... rename=VAR(N)=Column(N))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This has changed apparently from Col1 in the past to VAR1 currenlty in SAS 9.4.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 23:02:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Renaming-Column-during-Proc-Import/m-p/537912#M74019</guid>
      <dc:creator>CraigM</dc:creator>
      <dc:date>2019-02-22T23:02:34Z</dc:date>
    </item>
  </channel>
</rss>

