<?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: Perhaps a Hidden Character in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Perhaps-a-Hidden-Character/m-p/38934#M7876</link>
    <description>An unprintable character is likely it.  When I cut and paste your code into my SAS 9.2, I got c=1, so they matched.&lt;BR /&gt;
&lt;BR /&gt;
You can examine the character strings more closely by using a hex format.</description>
    <pubDate>Mon, 11 Jan 2010 21:57:19 GMT</pubDate>
    <dc:creator>Doc_Duke</dc:creator>
    <dc:date>2010-01-11T21:57:19Z</dc:date>
    <item>
      <title>Perhaps a Hidden Character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perhaps-a-Hidden-Character/m-p/38933#M7875</link>
      <description>I have two text string. One read from an excel file and the other from a sas data set. For some reason, they do not match according to SAS 9.1.3. &lt;BR /&gt;
&lt;BR /&gt;
I tested the following code on windows. I did not type the string, I copied and pasted from the source files. I can't see any differences in the string. However, SAS did not evaluate them as equal. &lt;BR /&gt;
&lt;BR /&gt;
Any ideas would be appreciated.&lt;BR /&gt;
&lt;BR /&gt;
data test;&lt;BR /&gt;
 a='MINOCYCLINE HYDROCHLORIDE';&lt;BR /&gt;
 b='MINOCYCLINE&amp;nbsp;HYDROCHLORIDE';&lt;BR /&gt;
 if trim(left(a))=trim(left(b)) then c=1;&lt;BR /&gt;
 else c=0;&lt;BR /&gt;
output;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Logs:&lt;BR /&gt;
31   data test;&lt;BR /&gt;
32    a='MINOCYCLINE HYDROCHLORIDE';&lt;BR /&gt;
33    b='MINOCYCLINE&amp;nbsp;HYDROCHLORIDE';&lt;BR /&gt;
34    if trim(left(a))=trim(left(b)) then c=1;&lt;BR /&gt;
35    else c=0;&lt;BR /&gt;
36   output;&lt;BR /&gt;
37   put a= b= c=;&lt;BR /&gt;
38   run;&lt;BR /&gt;
&lt;BR /&gt;
a=MINOCYCLINE HYDROCHLORIDE b=MINOCYCLINE&amp;nbsp;HYDROCHLORIDE c=0&lt;BR /&gt;
NOTE: The data set WORK.TEST has 1 observations and 3 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.05 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
39&lt;BR /&gt;
40   proc print; run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: There were 1 observations read from the data set WORK.TEST.&lt;BR /&gt;
NOTE: PROCEDURE PRINT used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds</description>
      <pubDate>Mon, 11 Jan 2010 20:10:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perhaps-a-Hidden-Character/m-p/38933#M7875</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-01-11T20:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Perhaps a Hidden Character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perhaps-a-Hidden-Character/m-p/38934#M7876</link>
      <description>An unprintable character is likely it.  When I cut and paste your code into my SAS 9.2, I got c=1, so they matched.&lt;BR /&gt;
&lt;BR /&gt;
You can examine the character strings more closely by using a hex format.</description>
      <pubDate>Mon, 11 Jan 2010 21:57:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perhaps-a-Hidden-Character/m-p/38934#M7876</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-01-11T21:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Perhaps a Hidden Character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perhaps-a-Hidden-Character/m-p/255618#M48848</link>
      <description>&lt;P&gt;similar problem with data imported from Access.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FORMAT fname $HEX20.;&lt;/P&gt;
&lt;P&gt;PROC PRINT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; VAR fname;&lt;/P&gt;
&lt;P&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get this: 20444F55474C41532020&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;20 is ascii for a space.&lt;/P&gt;
&lt;P&gt;but TRIM(fname) does not remove the leading space.&lt;/P&gt;
&lt;P&gt;ANYALPHA(fname) still returns 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 19:35:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perhaps-a-Hidden-Character/m-p/255618#M48848</guid>
      <dc:creator>rickpaulos</dc:creator>
      <dc:date>2016-03-09T19:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Perhaps a Hidden Character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perhaps-a-Hidden-Character/m-p/255660#M48869</link>
      <description>Trim is for trailing blanks. Try left().</description>
      <pubDate>Wed, 09 Mar 2016 21:22:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perhaps-a-Hidden-Character/m-p/255660#M48869</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-03-09T21:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Perhaps a Hidden Character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perhaps-a-Hidden-Character/m-p/255671#M48874</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; The joys of regularly programming in 4 different langauges.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;in MS:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Returns a string that contains a copy of a specified string &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;without leading spaces (&lt;SPAN&gt;&lt;SPAN class="input"&gt;LTrim&lt;/SPAN&gt;&lt;/SPAN&gt;), &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;without trailing spaces (&lt;SPAN&gt;&lt;SPAN class="input"&gt;RTrim&lt;/SPAN&gt;&lt;/SPAN&gt;), or&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt; without leading or trailing spaces (&lt;SPAN&gt;&lt;SPAN class="input"&gt;Trim&lt;/SPAN&gt;&lt;/SPAN&gt;).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;IN SAS&lt;/FONT&gt;&lt;/P&gt;
&lt;H1 class="xis-title"&gt;&lt;FONT color="#3366FF" size="3"&gt;TRIM Function&lt;/FONT&gt;&lt;/H1&gt;
&lt;P class="xis-shortDescription"&gt;&lt;FONT color="#3366FF"&gt;Removes trailing blanks from a character string, and returns one blank if the string is missing.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;BTRIM Function&lt;/FONT&gt;&lt;/P&gt;
&lt;H3 class="xis-title"&gt;&lt;FONT color="#0000FF"&gt;Optional Arguments&lt;/FONT&gt;&lt;/H3&gt;
&lt;DIV id="n0qe4963u3nqtsn1amz3uhjk60gq" class="xis-argDescriptionPair"&gt;
&lt;H4 class="xis-argument"&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN class="xis-userSuppliedValue"&gt;btrim-specification&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;P class="xis-paraSimpleFirst"&gt;&lt;FONT color="#0000FF"&gt;is one of the following:&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV id="n0nd2idcdi2vcan1isczhoqf229u" class="xis-argDescriptionPair"&gt;
&lt;H4 class="xis-argument"&gt;&lt;FONT color="#0000FF"&gt;LEADING&lt;/FONT&gt;&lt;/H4&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;P class="xis-paraSimpleFirst"&gt;&lt;FONT color="#0000FF"&gt;removes the blanks or specified characters from the beginning of the character string.&lt;/FONT&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="n0g1uvuhsmk7wdn155zjxn9xlusc" class="xis-argDescriptionPair"&gt;
&lt;H4 class="xis-argument"&gt;&lt;FONT color="#0000FF"&gt;TRAILING&lt;/FONT&gt;&lt;/H4&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;P class="xis-paraSimpleFirst"&gt;&lt;FONT color="#0000FF"&gt;removes the blanks or specified characters from the end of the character string.&lt;/FONT&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="p0btu29and952kn1cbbru6pi2g8y" class="xis-argDescriptionPair"&gt;
&lt;H4 class="xis-argument"&gt;&lt;FONT color="#0000FF"&gt;BOTH&lt;/FONT&gt;&lt;/H4&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;P class="xis-paraSimpleFirst"&gt;&lt;FONT color="#0000FF"&gt;removes the blanks or specified characters from both the beginning and the end of the character string.&lt;/FONT&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;TABLE class="xis-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="xis-summaryDefault"&gt;&lt;FONT color="#0000FF"&gt;Default&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class="xis-summaryText"&gt;&lt;FONT color="#0000FF"&gt;BOTH&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 09 Mar 2016 21:48:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perhaps-a-Hidden-Character/m-p/255671#M48874</guid>
      <dc:creator>rickpaulos</dc:creator>
      <dc:date>2016-03-09T21:48:57Z</dc:date>
    </item>
  </channel>
</rss>

