<?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: Compare Function in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Compare-Function/m-p/188485#M47696</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;You're right.&amp;nbsp; The modifier worked! Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Sep 2014 18:54:13 GMT</pubDate>
    <dc:creator>RobertHuey</dc:creator>
    <dc:date>2014-09-05T18:54:13Z</dc:date>
    <item>
      <title>Compare Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compare-Function/m-p/188481#M47692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm using the compare function in a data step to compare the values in two columns.&amp;nbsp; The length of the character string is 30 characters and the compare function says there is a difference in the 31st character.&amp;nbsp; I've trimmed the two variables and don't know why there is a difference.&amp;nbsp; The two cells say the same thing.&amp;nbsp; I've copied them over to excel and set them equal to one another and they check out.&amp;nbsp; All the other observations are matching as well.&amp;nbsp; Any help will be appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 18:14:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compare-Function/m-p/188481#M47692</guid>
      <dc:creator>RobertHuey</dc:creator>
      <dc:date>2014-09-05T18:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Compare Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compare-Function/m-p/188482#M47693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/thread/60168"&gt;https://communities.sas.com/thread/60168&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 18:25:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compare-Function/m-p/188482#M47693</guid>
      <dc:creator>Hima</dc:creator>
      <dc:date>2014-09-05T18:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Compare Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compare-Function/m-p/188483#M47694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Hima but I was using the compare function and not the PROC.&amp;nbsp; See below. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;result= compare(NamesFromFile, MasterNames)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 18:36:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compare-Function/m-p/188483#M47694</guid>
      <dc:creator>RobertHuey</dc:creator>
      <dc:date>2014-09-05T18:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: Compare Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compare-Function/m-p/188484#M47695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may have some invisible-unprinted character in your variables, such as 'tab'. The best way to tell the difference is to see what machine sees: the hex value, you can try to fiddle with some options, but that would depend on your luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; (v1 v2) (&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;$char4.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; v1=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;hex16.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; / v2=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;hex16.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc1=compare(v1,v2); &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: white;"&gt;/*v1 is tailed by a 'blank' while v2 has a 'tab'*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc2=compare(trim(v1),trim(v2));&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: white;"&gt;/*trim will only take off the blank, so it wouldn't work*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc3=compare(trim(v1),trim(v2),&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;':'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; background: white;"&gt;/*with the modifier, it only compares the shortest char, which is 3, so now it works*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;aaa aaa&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;Haikuo &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 18:39:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compare-Function/m-p/188484#M47695</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-09-05T18:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Compare Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compare-Function/m-p/188485#M47696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;You're right.&amp;nbsp; The modifier worked! Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 18:54:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compare-Function/m-p/188485#M47696</guid>
      <dc:creator>RobertHuey</dc:creator>
      <dc:date>2014-09-05T18:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Compare Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compare-Function/m-p/188486#M47697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you only want to compare the PRINTABLE part of your variable, use compress();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; results=compare(compress(v1,,'kw'),compress(v2,,'kw'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 20:19:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compare-Function/m-p/188486#M47697</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-09-05T20:19:56Z</dc:date>
    </item>
  </channel>
</rss>

