<?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: Selecting from group in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Selecting-from-group/m-p/319701#M70289</link>
    <description>&lt;P&gt;Thanks much.. It worked perfectly!&lt;/P&gt;</description>
    <pubDate>Sat, 17 Dec 2016 03:18:53 GMT</pubDate>
    <dc:creator>bharani721</dc:creator>
    <dc:date>2016-12-17T03:18:53Z</dc:date>
    <item>
      <title>Selecting from group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Selecting-from-group/m-p/319686#M70275</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Please help me on this. I'm writing a SAS code to select from group of variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample data:&lt;/P&gt;&lt;P&gt;Store number &amp;nbsp; &amp;nbsp;Store list&lt;/P&gt;&lt;P&gt;----------------- &amp;nbsp; &amp;nbsp; ------------&lt;/P&gt;&lt;P&gt;2 &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;(2,4,5)&lt;/P&gt;&lt;P&gt;3 &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;(33,44,9)&lt;/P&gt;&lt;P&gt;10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(3,10,2)&lt;/P&gt;&lt;P&gt;35 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(9,2,4)&lt;/P&gt;&lt;P&gt;12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(35,12,25)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm expecting a report as below:&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i.e. 'Store number' present from 'store list'... 2 is present from (2,4,5) list and 10 is present from (3,10,2) and 12 from (35,12,25).&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 23:53:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Selecting-from-group/m-p/319686#M70275</guid>
      <dc:creator>bharani721</dc:creator>
      <dc:date>2016-12-16T23:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting from group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Selecting-from-group/m-p/319688#M70277</link>
      <description>&lt;P&gt;Are these values in the same dataset? Different data sets? Is the "list" a single value as shown complete with commas and parentheses?&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2016 00:00:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Selecting-from-group/m-p/319688#M70277</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-12-17T00:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting from group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Selecting-from-group/m-p/319689#M70278</link>
      <description>&lt;P&gt;Both of them are present in the same dataset. &amp;nbsp;yes, the list always in the same format with commas and parentheses like (2,3,4)&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2016 00:02:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Selecting-from-group/m-p/319689#M70278</guid>
      <dc:creator>bharani721</dc:creator>
      <dc:date>2016-12-17T00:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting from group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Selecting-from-group/m-p/319694#M70283</link>
      <description>&lt;P&gt;You can use FINDW or INDEXW, make sure to specify the delimiters in the third paramter.&lt;/P&gt;
&lt;P&gt;You can't use FIND() or INDEX() because 2 will be found in 12, 22, 23, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
x=put(find, 8. -l);
if findw(string, trim(compress(x)), '(),')&amp;gt;0 then output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 17 Dec 2016 01:59:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Selecting-from-group/m-p/319694#M70283</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-12-17T01:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting from group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Selecting-from-group/m-p/319701#M70289</link>
      <description>&lt;P&gt;Thanks much.. It worked perfectly!&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2016 03:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Selecting-from-group/m-p/319701#M70289</guid>
      <dc:creator>bharani721</dc:creator>
      <dc:date>2016-12-17T03:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting from group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Selecting-from-group/m-p/319713#M70298</link>
      <description>&lt;P&gt;alternatively with do until&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
set have;
i=0;
do until(scan(compress(Store_list,'()'),i,',') eq '') ;
i+1;
if compress(Store_number) eq scan(compress(Store_list,'()'),i,',') then output;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 17 Dec 2016 09:12:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Selecting-from-group/m-p/319713#M70298</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2016-12-17T09:12:11Z</dc:date>
    </item>
  </channel>
</rss>

