<?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 Compare two strings by percentage in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/449995#M283629</link>
    <description>&lt;P&gt;Great!! Thanks a lot Tom.It worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I need little more help.Need to compare two strings by first 5 alphabets.&lt;/P&gt;&lt;P&gt;e.g&amp;nbsp; &amp;nbsp; &amp;nbsp;var1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;match_parentage&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;marutix&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; marutisyz&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Mar 2018 18:08:05 GMT</pubDate>
    <dc:creator>shubha1babu</dc:creator>
    <dc:date>2018-03-30T18:08:05Z</dc:date>
    <item>
      <title>How Compare two strings by percentage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/449630#M283624</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two variable var1 var2.&lt;/P&gt;&lt;P&gt;In var1 character is like "marutivx" and&amp;nbsp;&lt;SPAN&gt;In var2 character is like "marutivx(0)". I need to calculate the similarities/differences by percentage.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help on little urgent basis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Shubho&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 12:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/449630#M283624</guid>
      <dc:creator>shubha1babu</dc:creator>
      <dc:date>2018-03-29T12:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: How Compare two strings by percentage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/449647#M283625</link>
      <description>&lt;P&gt;This will help you:&amp;nbsp; &lt;A href="http://support.sas.com/kb/48/582.html" target="_blank"&gt;http://support.sas.com/kb/48/582.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 13:28:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/449647#M283625</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2018-03-29T13:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: How Compare two strings by percentage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/449648#M283626</link>
      <description>&lt;P&gt;That is a tough task. How you define&amp;nbsp;&lt;SPAN&gt;similarities/differences ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Anyway, COMPARE() might give you a little help.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
var1="marutivx";var2="marutivx(0)";
diff=compare(var1,var2,'i');
put var1= var2= diff=;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Mar 2018 13:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/449648#M283626</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-03-29T13:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: How Compare two strings by percentage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/449854#M283627</link>
      <description>&lt;P&gt;Let me frame it once again.&lt;/P&gt;&lt;P&gt;I have 1000 obs. and two variables var1 and var2.I want to create 3rd variable which will show the similarities/differences between two strings by percentage wise.&lt;/P&gt;&lt;P&gt;ex.&lt;/P&gt;&lt;P&gt;var1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var2&lt;/P&gt;&lt;P&gt;maruti&amp;nbsp; &amp;nbsp; &amp;nbsp; marutix&lt;/P&gt;&lt;P&gt;vxez&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vexz12&lt;/P&gt;&lt;P&gt;LX CNG&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JHXD GX&lt;/P&gt;&lt;P&gt;and so on......&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2018 05:07:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/449854#M283627</guid>
      <dc:creator>shubha1babu</dc:creator>
      <dc:date>2018-03-30T05:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: How Compare two strings by percentage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/449893#M283628</link>
      <description>&lt;P&gt;That's what my previous post covers...the &lt;STRONG&gt;complev&lt;/STRONG&gt; function.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2018 12:05:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/449893#M283628</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2018-03-30T12:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: How Compare two strings by percentage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/449995#M283629</link>
      <description>&lt;P&gt;Great!! Thanks a lot Tom.It worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I need little more help.Need to compare two strings by first 5 alphabets.&lt;/P&gt;&lt;P&gt;e.g&amp;nbsp; &amp;nbsp; &amp;nbsp;var1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;match_parentage&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;marutix&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; marutisyz&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2018 18:08:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/449995#M283629</guid>
      <dc:creator>shubha1babu</dc:creator>
      <dc:date>2018-03-30T18:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: How Compare two strings by percentage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/450057#M283630</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/135779"&gt;@shubha1babu&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Great!! Thanks a lot Tom.It worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I need little more help.Need to compare two strings by first 5 alphabets.&lt;/P&gt;
&lt;P&gt;e.g&amp;nbsp; &amp;nbsp; &amp;nbsp;var1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;match_parentage&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;marutix&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; marutisyz&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Use the SUBSTR function to select the first 5 characters from each variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;result = complev(substr(var1,1,5), substr(var2,1,5));&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2018 20:18:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-Compare-two-strings-by-percentage/m-p/450057#M283630</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-30T20:18:32Z</dc:date>
    </item>
  </channel>
</rss>

