<?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 Comparing two variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Comparing-two-variables/m-p/332635#M74890</link>
    <description>&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;I have two variables named MNEMONIC and Details. I need to compare values in these variables and find out if replacing Mnemonic with Details creates value.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;I'm using COMPGED to compare these variables as below&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;GED_SCORE = COMPGED(UPCASE(STRIP(COMPRESS(MNEMONIC,' :_/\-'))) ,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="trebuchet ms,geneva"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UPCASE(STRIP(COMPRESS(DETAILS,' :_/\-')))) ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;And have written few conditions to remove records which doesnt fetch me any value if I replace MNEMONIC with Details&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;IF GED_SCORE = 0 THEN DELETE ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;IF GED_SCORE &amp;lt; 35 THEN DELETE ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;Could anyone please suggest better way of doing this ?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;Sample Dataset: { Edited }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;&lt;STRONG&gt;Mnemonic&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Details&lt;/STRONG&gt;&lt;BR /&gt;ABC:Test_Admin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;All Britain&amp;nbsp;Corp Test Admin User&lt;BR /&gt;ESPC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; East Special Port Center&lt;BR /&gt;Memo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Memo by post&lt;BR /&gt;Green_Card_holder&amp;nbsp;&amp;nbsp;Green Card Holder &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;Replacing Mnemonic with Details for 1st and 2nd records create high value ;&amp;nbsp; For 3rd value provided is average and for last replace doesn't provide any value as it is the same words replaced by special characters.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;There are about 2 millions of records and just for performance reasons I don't want to replace all of them. Hope this helps.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;{ Edited }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;Main reason for doing this fuzzy_logic is to save space.&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Feb 2017 11:35:57 GMT</pubDate>
    <dc:creator>nrk1787db1</dc:creator>
    <dc:date>2017-02-15T11:35:57Z</dc:date>
    <item>
      <title>Comparing two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-two-variables/m-p/332635#M74890</link>
      <description>&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;I have two variables named MNEMONIC and Details. I need to compare values in these variables and find out if replacing Mnemonic with Details creates value.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;I'm using COMPGED to compare these variables as below&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;GED_SCORE = COMPGED(UPCASE(STRIP(COMPRESS(MNEMONIC,' :_/\-'))) ,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="trebuchet ms,geneva"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UPCASE(STRIP(COMPRESS(DETAILS,' :_/\-')))) ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;And have written few conditions to remove records which doesnt fetch me any value if I replace MNEMONIC with Details&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;IF GED_SCORE = 0 THEN DELETE ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;IF GED_SCORE &amp;lt; 35 THEN DELETE ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;Could anyone please suggest better way of doing this ?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;Sample Dataset: { Edited }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;&lt;STRONG&gt;Mnemonic&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Details&lt;/STRONG&gt;&lt;BR /&gt;ABC:Test_Admin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;All Britain&amp;nbsp;Corp Test Admin User&lt;BR /&gt;ESPC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; East Special Port Center&lt;BR /&gt;Memo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Memo by post&lt;BR /&gt;Green_Card_holder&amp;nbsp;&amp;nbsp;Green Card Holder &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;Replacing Mnemonic with Details for 1st and 2nd records create high value ;&amp;nbsp; For 3rd value provided is average and for last replace doesn't provide any value as it is the same words replaced by special characters.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;There are about 2 millions of records and just for performance reasons I don't want to replace all of them. Hope this helps.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;{ Edited }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="trebuchet ms,geneva"&gt;Main reason for doing this fuzzy_logic is to save space.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 11:35:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-two-variables/m-p/332635#M74890</guid>
      <dc:creator>nrk1787db1</dc:creator>
      <dc:date>2017-02-15T11:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-two-variables/m-p/332649#M74894</link>
      <description>&lt;P&gt;It would help if you provided&amp;nbsp;an example dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 15:23:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-two-variables/m-p/332649#M74894</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-02-14T15:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-two-variables/m-p/332653#M74896</link>
      <description>&lt;P&gt;Not sure what we can suggest, you haven't told us anything other than you have that line of code. &amp;nbsp;If it works then good. &amp;nbsp;I can certainly suggest not coding all in uppercase as it makes it virtually unreadable.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 15:24:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-two-variables/m-p/332653#M74896</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-02-14T15:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-two-variables/m-p/332685#M74909</link>
      <description>&lt;P&gt;&lt;FONT face="Trebuchet MS"&gt;Thank you for your response, Tried giving a small 5 records dataset as example.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 16:15:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-two-variables/m-p/332685#M74909</guid>
      <dc:creator>nrk1787db1</dc:creator>
      <dc:date>2017-02-14T16:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-two-variables/m-p/332708#M74923</link>
      <description>&lt;P&gt;What are you trying to accomplish? Are you trying to save space, combine similar "details", or something else?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 16:52:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-two-variables/m-p/332708#M74923</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-02-14T16:52:53Z</dc:date>
    </item>
  </channel>
</rss>

