<?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: To find if the group of elements are substring of another string ? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478316#M71352</link>
    <description>Yes case sensitive is not needed and even doesn’t matter just the words should match and there won’t be any space after commma.sorry for that I didn’t upload the data properly</description>
    <pubDate>Mon, 16 Jul 2018 10:11:56 GMT</pubDate>
    <dc:creator>vrushankshah</dc:creator>
    <dc:date>2018-07-16T10:11:56Z</dc:date>
    <item>
      <title>To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478274#M71345</link>
      <description>&lt;P&gt;I want to find if the given elements under a group are the part of another string or no ? If they are then I want the group number of the string where it was the part. They should be&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;part&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of another string.For example, 'Benefits, verify' is one string under group 1 and that is part of group 2 string (claims,verify,benefits,verify). I also want to count how many times it appears in another string. Additional : &lt;STRONG&gt;Do not include the single words&amp;nbsp; in calculation.&lt;/STRONG&gt; For example in the below example do not include benefits in calculation.&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;Column1&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; group &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;Benefits&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;verify&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;&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;1&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;claims&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;verify&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;benefits&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;verify&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;2&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;inquiry&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;type&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;&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;3&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;claims&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;verify&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;&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;4&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="lit"&gt;Benefits,verify,inquiry,type,Benefits&amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="lit"&gt;Benefits&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; 6&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="lit"&gt;Benefits&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; 7&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output expected:&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;column1&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; Part of group&amp;nbsp; &amp;nbsp; &amp;nbsp;count &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;Benefits&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; verify&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;&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;2&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="lit"&gt;Benefits,verify&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; 5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;claims&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;verify&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;&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;2&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN class="lit"&gt;1&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;inquiry&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;type&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;&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN class="pun"&gt;-&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;claims&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;verify&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;benefits&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;verify&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="pun"&gt;&lt;SPAN&gt;Benefits,verify,inquiry,type,Benefits&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;PRE class="lang-r prettyprint prettyprinted"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 20:38:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478274#M71345</guid>
      <dc:creator>vrushankshah</dc:creator>
      <dc:date>2018-07-16T20:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478314#M71351</link>
      <description>&lt;P&gt;So your data looks like this correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
length Column1 $200;
input Column1 $ group;
datalines;
Benefits,verify                  1
claims,verify,benefits,verify    2
inquiry,type                     3
claims,verify                    4
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I take it that you want some case insensitive solution since you want the string "&lt;SPAN class="pln"&gt;Benefits&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;verify" to be part of "claims&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;verify&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;benefits&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;verify"? And what about the space after the comma? That does not appear in the string for group 2&lt;/SPAN&gt;&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>Mon, 16 Jul 2018 10:08:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478314#M71351</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-07-16T10:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478316#M71352</link>
      <description>Yes case sensitive is not needed and even doesn’t matter just the words should match and there won’t be any space after commma.sorry for that I didn’t upload the data properly</description>
      <pubDate>Mon, 16 Jul 2018 10:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478316#M71352</guid>
      <dc:creator>vrushankshah</dc:creator>
      <dc:date>2018-07-16T10:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478317#M71353</link>
      <description>&lt;P&gt;Ok. What if the string&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;verify,claims" were to appear? Does the order of the words separated by comma matter?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 10:16:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478317#M71353</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-07-16T10:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478319#M71354</link>
      <description>The order matters here so verify,claims is different string</description>
      <pubDate>Mon, 16 Jul 2018 10:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478319#M71354</guid>
      <dc:creator>vrushankshah</dc:creator>
      <dc:date>2018-07-16T10:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478320#M71355</link>
      <description>&lt;P&gt;My take on it using PROC SQL&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data groups;
  infile cards dlm=' ';
  length Column1 $30 group 8;
  input Column1 group;
cards;
Benefits,verify                  1
claims,verify,benefits,verify    2
inquiry,type                     3
claims,verify                    4
;
run;
proc sql noprint;
  create table test as
    select 
      a.Column1,
      a.Group,
      part.PartOfGroup
    from groups a
    left join
      (select distinct
        a.Column1, 
        a.group,
        case
          when (find(b.Column1,a.Column1,'it')) then b.group
          else .
        end as PartofGroup
      from groups a,
           groups b
      having PartofGroup ne a.group
         and PartofGroup ne . ) part
     on a.Column1 = part.Column1
    ;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jul 2018 10:32:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478320#M71355</guid>
      <dc:creator>MichaelLarsen</dc:creator>
      <dc:date>2018-07-16T10:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478323#M71356</link>
      <description>&lt;P&gt;Ok. Here is a simple data step solution&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
length Column1 $200;
input Column1 $ group;
datalines;
Benefits,verify                  1
claims,verify,benefits,verify    2
inquiry,type                     3
claims,verify                    4
;

data want(keep=Column1 Part_Of_Group count);
   set have nobs=nobs;
   count=0;
   do _N_=1 to nobs;
      set have(rename=(Column1=compColumn1 group=compGroup)) point=_N_;
      if find(compColumn1, Column1, 'it') ne 0 and group ne compGroup then do;
         Part_Of_Group=compGroup;
         count+1;
      end;
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jul 2018 10:46:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478323#M71356</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-07-16T10:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478414#M71359</link>
      <description>&lt;P&gt;Under the Part_of_group section it just displays one group number but I wanted the multiple groups numbers where it was the part.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 16:38:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478414#M71359</guid>
      <dc:creator>vrushankshah</dc:creator>
      <dc:date>2018-07-16T16:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478472#M71368</link>
      <description>Sorry there was some additional thing which I forgot to mention can you please help me with the update part !</description>
      <pubDate>Mon, 16 Jul 2018 19:17:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478472#M71368</guid>
      <dc:creator>vrushankshah</dc:creator>
      <dc:date>2018-07-16T19:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478473#M71369</link>
      <description>Really Sorry there was some additional thing which I forgot to mention can you please help me with the update part !</description>
      <pubDate>Mon, 16 Jul 2018 19:18:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478473#M71369</guid>
      <dc:creator>vrushankshah</dc:creator>
      <dc:date>2018-07-16T19:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478479#M71370</link>
      <description>&lt;P&gt;Are you sure you want data presented this way?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is rarely a good idea to represent multiple numeric values in a single variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;.. Though it can be done fairly simple&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 20:17:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478479#M71370</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-07-16T20:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478481#M71372</link>
      <description>Actually I wanted on different line each group number but I thought it might be difficult hence told to have in same line.</description>
      <pubDate>Mon, 16 Jul 2018 20:29:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478481#M71372</guid>
      <dc:creator>vrushankshah</dc:creator>
      <dc:date>2018-07-16T20:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478482#M71373</link>
      <description>&lt;P&gt;Not difficult. But please specify exactly how you want the output then.. This solution gives you the Part_Of_Group concatenated on one line&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
length Column1 $200;
input Column1 $ group;
datalines;
Benefits,verify                           1
claims,verify,benefits,verify             2
inquiry,type                              3
claims,verify                             4
Benefits,verify,inquiry,type,Benefits     5
Benefits                                  6
Benefits                                  7
;

data want(keep=Column1 Part_Of_Group count);
   set have nobs=nobs;
   length Part_Of_Group $200;
   count=0;
   do _N_=1 to nobs;
      set have(rename=(Column1=compColumn1 group=compGroup)) point=_N_;
      if find(compColumn1, Column1, 'it') ne 0 &amp;amp; group ne compGroup &amp;amp; countw(Column1, ",")&amp;gt;1 then do;
         Part_Of_Group=catx(",",Part_Of_Group,compGroup);
         count+1;
      end;
   end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jul 2018 20:33:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478482#M71373</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-07-16T20:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478484#M71375</link>
      <description>Final update is done how I want the output to be ! Thank you !</description>
      <pubDate>Mon, 16 Jul 2018 20:39:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478484#M71375</guid>
      <dc:creator>vrushankshah</dc:creator>
      <dc:date>2018-07-16T20:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478485#M71376</link>
      <description>&lt;P&gt;Great. No problem. Please mark the thread as a solution to help other users navigate the forum.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 20:40:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478485#M71376</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-07-16T20:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478486#M71377</link>
      <description>I am sorry I meant fianl update to the question is done how the output I am expecting but when I run your code it is not giving the expected output can you please check once again !! Thank you !</description>
      <pubDate>Mon, 16 Jul 2018 20:42:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478486#M71377</guid>
      <dc:creator>vrushankshah</dc:creator>
      <dc:date>2018-07-16T20:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: To find if the group of elements are substring of another string ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478487#M71378</link>
      <description>&lt;P&gt;Ah ok. This gives you the final required output&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
length Column1 $200;
input Column1 $ group;
datalines;
Benefits,verify                           1
claims,verify,benefits,verify             2
inquiry,type                              3
claims,verify                             4
Benefits,verify,inquiry,type,Benefits     5
Benefits                                  6
Benefits                                  7
;

data want(keep=Column1 Part_Of_Group count);
   set have nobs=nobs;
   count=0;
   do _N_=1 to nobs;
      set have(rename=(Column1=compColumn1 group=compGroup)) point=_N_;
      if find(compColumn1, Column1, 'it') ne 0 &amp;amp; group ne compGroup &amp;amp; countw(Column1, ",")&amp;gt;1 then do;
         Part_Of_Group=compGroup;
         count+1;
         output;
      end;
   end;
   if count=0 &amp;amp; countw(Column1, ",")&amp;gt;1 then output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jul 2018 20:49:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/To-find-if-the-group-of-elements-are-substring-of-another-string/m-p/478487#M71378</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-07-16T20:49:33Z</dc:date>
    </item>
  </channel>
</rss>

