<?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 missing underscore in Sas variable names in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/missing-underscore-in-Sas-variable-names/m-p/34126#M4355</link>
    <description>I am running the following macro in SAS EG.&lt;BR /&gt;
&lt;BR /&gt;
The SAS dataset created does NOT have underscores between column names containing 2 or more words.  For example, Branch Number does NOT become Branch_Number, but stays Branch Number. &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%macro import_xls(data=,sheet=,xls=);&lt;BR /&gt;
&lt;BR /&gt;
proc import dbms=excelcs out=&amp;amp;data&lt;BR /&gt;
            datafile="&amp;amp;xls"&lt;BR /&gt;
            replace;&lt;BR /&gt;
     server="&amp;amp;machineid..nam.nsroot.net";  /* Name of PC files server   */&lt;BR /&gt;
     port=8621;           /* Port number listening on the PC server */&lt;BR /&gt;
     version='2002';      /* Excel file version */&lt;BR /&gt;
     sheet="&amp;amp;sheet";     /* Sheet name */&lt;BR /&gt;
     scantext=yes;        /* Scan all rows data for the largest size */&lt;BR /&gt;
     usedate=yes;         /* Use DATE format for date/time columns */&lt;BR /&gt;
     scantime=yes;        /* Scan and identify time columns */&lt;BR /&gt;
     dbsaslabel=none;     /* Leave SAS label names to be nulls */&lt;BR /&gt;
     textsize=512;        /* Largest text size allowed */&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
%mend import_xls;</description>
    <pubDate>Thu, 10 Jun 2010 19:43:24 GMT</pubDate>
    <dc:creator>steve_citi</dc:creator>
    <dc:date>2010-06-10T19:43:24Z</dc:date>
    <item>
      <title>missing underscore in Sas variable names</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/missing-underscore-in-Sas-variable-names/m-p/34126#M4355</link>
      <description>I am running the following macro in SAS EG.&lt;BR /&gt;
&lt;BR /&gt;
The SAS dataset created does NOT have underscores between column names containing 2 or more words.  For example, Branch Number does NOT become Branch_Number, but stays Branch Number. &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%macro import_xls(data=,sheet=,xls=);&lt;BR /&gt;
&lt;BR /&gt;
proc import dbms=excelcs out=&amp;amp;data&lt;BR /&gt;
            datafile="&amp;amp;xls"&lt;BR /&gt;
            replace;&lt;BR /&gt;
     server="&amp;amp;machineid..nam.nsroot.net";  /* Name of PC files server   */&lt;BR /&gt;
     port=8621;           /* Port number listening on the PC server */&lt;BR /&gt;
     version='2002';      /* Excel file version */&lt;BR /&gt;
     sheet="&amp;amp;sheet";     /* Sheet name */&lt;BR /&gt;
     scantext=yes;        /* Scan all rows data for the largest size */&lt;BR /&gt;
     usedate=yes;         /* Use DATE format for date/time columns */&lt;BR /&gt;
     scantime=yes;        /* Scan and identify time columns */&lt;BR /&gt;
     dbsaslabel=none;     /* Leave SAS label names to be nulls */&lt;BR /&gt;
     textsize=512;        /* Largest text size allowed */&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
%mend import_xls;</description>
      <pubDate>Thu, 10 Jun 2010 19:43:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/missing-underscore-in-Sas-variable-names/m-p/34126#M4355</guid>
      <dc:creator>steve_citi</dc:creator>
      <dc:date>2010-06-10T19:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: missing underscore in Sas variable names</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/missing-underscore-in-Sas-variable-names/m-p/34127#M4356</link>
      <description>Have a look at the option "validvarname".</description>
      <pubDate>Thu, 10 Jun 2010 21:56:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/missing-underscore-in-Sas-variable-names/m-p/34127#M4356</guid>
      <dc:creator>twocanbazza</dc:creator>
      <dc:date>2010-06-10T21:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: missing underscore in Sas variable names</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/missing-underscore-in-Sas-variable-names/m-p/34128#M4357</link>
      <description>In certain cases, EG will allow non-default column names to be created. As the other poster suggests, you might try submitting the following code, then calling your macro program:&lt;BR /&gt;
&lt;BR /&gt;
OPTIONS VALIDVARNAME=V7;&lt;BR /&gt;
&lt;BR /&gt;
The default setting in EG is VALIDVARNAME=ANY.&lt;BR /&gt;
&lt;BR /&gt;
There's a note about GETNAMES=YES changing things over to SAS names... might be worth a test as well.&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#/documentation/cdl/en/proc/61895/HTML/default/a000312413.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#/documentation/cdl/en/proc/61895/HTML/default/a000312413.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Tech support could also be a good resource on this: &lt;A href="http://support.sas.com/techsup/contact/" target="_blank"&gt;http://support.sas.com/techsup/contact/&lt;/A&gt;</description>
      <pubDate>Mon, 14 Jun 2010 13:52:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/missing-underscore-in-Sas-variable-names/m-p/34128#M4357</guid>
      <dc:creator>RichardH_sas</dc:creator>
      <dc:date>2010-06-14T13:52:24Z</dc:date>
    </item>
  </channel>
</rss>

