<?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 write DBSASTYPE code for excel column names with symbols in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-write-DBSASTYPE-code-for-excel-column-names-with-symbols/m-p/447950#M281793</link>
    <description>Using a # helped with the . in the name&lt;BR /&gt;"AB# ADD"n='char(13)'</description>
    <pubDate>Thu, 22 Mar 2018 21:02:40 GMT</pubDate>
    <dc:creator>HN2001</dc:creator>
    <dc:date>2018-03-22T21:02:40Z</dc:date>
    <item>
      <title>how to write DBSASTYPE code for excel column names with symbols</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-write-DBSASTYPE-code-for-excel-column-names-with-symbols/m-p/432526#M281789</link>
      <description>&lt;P&gt;I have multiple excel files where the variable length is different.&amp;nbsp; Once in SAS I need to combine these files so I need to use libname excel code and read in the variable names using DBSASTYPE.&amp;nbsp; Two of my variable names in excel contain symbols (+ and .)&amp;nbsp; Without going into each excel file and changing the column name to exclude the symbol, is there code that will ignore those symbols?&lt;/P&gt;&lt;P&gt;The column in excel is ADD+, how do I code that in the DBSASTYPE lines???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LIBNAME WrkBk EXCEL "filepath/file" MIXED=YES;&lt;/P&gt;&lt;P&gt;DATA test1;&lt;BR /&gt;SET WrkBk."Subject$"n&lt;BR /&gt;(DBSASTYPE=(&lt;/P&gt;&lt;P&gt;"PACKAGE NO"='char(8)'&lt;/P&gt;&lt;P&gt;"SEQ"='char(8)'&lt;BR /&gt;"ID"='char(13)'&lt;BR /&gt;"NAME"='char(27)'&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"ADD+"='char(27)'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;));&lt;BR /&gt;RUN;&lt;BR /&gt;LIBNAME WrkBk CLEAR;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 21:44:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-write-DBSASTYPE-code-for-excel-column-names-with-symbols/m-p/432526#M281789</guid>
      <dc:creator>HN2001</dc:creator>
      <dc:date>2018-01-30T21:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to write DBSASTYPE code for excel column names with symbols</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-write-DBSASTYPE-code-for-excel-column-names-with-symbols/m-p/432551#M281790</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME WrkBk EXCEL "filepath/file" MIXED=YES;
DATA test1;
SET WrkBk."Subject$"n
(DBSASTYPE=(
"PACKAGE NO"n='char(8)'
SEQ='char(8)'
ID='char(13)'
NAME='char(27)'
"ADD+"n='char(27)'
));
RUN;
LIBNAME WrkBk CLEAR;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is how you reference non-SAS compatible column names. The rest of the code is untested.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 22:35:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-write-DBSASTYPE-code-for-excel-column-names-with-symbols/m-p/432551#M281790</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-01-30T22:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to write DBSASTYPE code for excel column names with symbols</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-write-DBSASTYPE-code-for-excel-column-names-with-symbols/m-p/432556#M281791</link>
      <description>&lt;P&gt;Thanks SASKiwi.&amp;nbsp; Adding the n seems to get me past the ADD+ but I forgot to include in my orig post the var name that has the .&lt;/P&gt;&lt;P&gt;Adding n to this variable still produces an error saying invalid column name.&amp;nbsp; Any ideas on how to resolve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I currently have&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"AB. ADD"n&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'char(13)'&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 22:50:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-write-DBSASTYPE-code-for-excel-column-names-with-symbols/m-p/432556#M281791</guid>
      <dc:creator>HN2001</dc:creator>
      <dc:date>2018-01-30T22:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to write DBSASTYPE code for excel column names with symbols</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-write-DBSASTYPE-code-for-excel-column-names-with-symbols/m-p/433069#M281792</link>
      <description>At this point it seem easier to rename the columns in Excel instead. &lt;BR /&gt;That said, check that you have &lt;BR /&gt;OPTIONS VALIDVARNAME=ANY;</description>
      <pubDate>Thu, 01 Feb 2018 11:49:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-write-DBSASTYPE-code-for-excel-column-names-with-symbols/m-p/433069#M281792</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-02-01T11:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to write DBSASTYPE code for excel column names with symbols</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-write-DBSASTYPE-code-for-excel-column-names-with-symbols/m-p/447950#M281793</link>
      <description>Using a # helped with the . in the name&lt;BR /&gt;"AB# ADD"n='char(13)'</description>
      <pubDate>Thu, 22 Mar 2018 21:02:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-write-DBSASTYPE-code-for-excel-column-names-with-symbols/m-p/447950#M281793</guid>
      <dc:creator>HN2001</dc:creator>
      <dc:date>2018-03-22T21:02:40Z</dc:date>
    </item>
  </channel>
</rss>

