<?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: Using Compged Modifiers in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-Compged-Modifiers/m-p/556582#M155041</link>
    <description>&lt;P&gt;Place the modifiers inside quotes to indicate they are literal values. Without quotes then SAS expects the modifiers to be in a variable and the : is getting treated as some sort of operator in the wrong place:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;match=compged(Dog_Nm1, Dog_Nm2,&lt;/FONT&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;30&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;,'l:i');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 May 2019 21:46:51 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-05-06T21:46:51Z</dc:date>
    <item>
      <title>Using Compged Modifiers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Compged-Modifiers/m-p/556577#M155037</link>
      <description>&lt;P&gt;I am trying to use modifiers on the compget function. Here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data compged;
set crossjoin;
match=compged(Dog_Nm1, Dog_Nm2,30,"l:i");
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This returns an error. Does anyone know how I use these modifiers? (30, l:i)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also noticed that "Pippy Boy" and Pippy" give a value greater than 0 in the code above, but when I do this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data _Null_ ;
Text1 = "Pippy" ;
Text2 = "Pippy Boy" ;
Test = CompGed( Text2 , Text1 ,"il:") ;
Put Test= ;
Run ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;it returns a value of 0. What?!&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 21:46:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Compged-Modifiers/m-p/556577#M155037</guid>
      <dc:creator>theponcer</dc:creator>
      <dc:date>2019-05-06T21:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using Compged Modifiers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Compged-Modifiers/m-p/556582#M155041</link>
      <description>&lt;P&gt;Place the modifiers inside quotes to indicate they are literal values. Without quotes then SAS expects the modifiers to be in a variable and the : is getting treated as some sort of operator in the wrong place:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;match=compged(Dog_Nm1, Dog_Nm2,&lt;/FONT&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;30&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;,'l:i');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 21:46:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Compged-Modifiers/m-p/556582#M155041</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-06T21:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using Compged Modifiers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Compged-Modifiers/m-p/556592#M155049</link>
      <description>&lt;P&gt;Yup, I modified the question when I figured that out. The error is gone, but the problem is still there. I can't get "Pippy Boy" and "Pippy" to match using the colon modifier in the data step, so I'm not sure that it is working correctly even though it IS working in the test code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 22:06:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Compged-Modifiers/m-p/556592#M155049</guid>
      <dc:creator>theponcer</dc:creator>
      <dc:date>2019-05-06T22:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using Compged Modifiers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Compged-Modifiers/m-p/556601#M155054</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/252152"&gt;@theponcer&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Yup, I modified the question when I figured that out. The error is gone, but the problem is still there. I can't get "Pippy Boy" and "Pippy" to match using the colon modifier in the data step, so I'm not sure that it is working correctly even though it IS working in the test code.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Your code when I run it gets a value of 0, which is a perfect match for compged.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your actual values looks like and is not returning 0&amp;nbsp;then perhaps you have a leading character other than&amp;nbsp;a&amp;nbsp;space character such as a null character, ASCII 255. Which returns 300. I can't post code as the forum changes the NULL to a space but in this code:&lt;/P&gt;
&lt;PRE&gt;Data _Null_ ;
Text1 = "Pippy" ;
Text2 = "&amp;nbsp;Pippy Boy" ;
Test = CompGed( Text2 , Text1 ,"il:") ;
Put Test= ;
Run ;&lt;/PRE&gt;
&lt;P&gt;highlight the space before Pippy in Text2. Then hold the Alt key and type 255 &lt;STRONG&gt;on the number pad&lt;/STRONG&gt; (on a Windows system) and release. Then run the code to see 300 as a result&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 22:26:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Compged-Modifiers/m-p/556601#M155054</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-06T22:26:06Z</dc:date>
    </item>
  </channel>
</rss>

