<?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 to find a particular number from the filed which has series of 24 numbers in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-particular-number-from-the-filed-which-has-series/m-p/928238#M365209</link>
    <description>&lt;P&gt;Not sure why&amp;nbsp;&lt;SPAN&gt;111221122121112121111121 qualifies as Ever2=1 given your rule is "numbers &amp;gt; 2"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if below returns what you want. Else just amend the list of digits to search for.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data demo;
  input digits:$24.;
  Ever4 = (findc(digits,'56789')&amp;gt;0);
  Ever2 = (Ever4=0 and findc(digits,'34')&amp;gt;0);
  datalines;
111221122121112121113121
455444443211113212211221 
111111111111111111111111
888887654323221211111111
000000000000000000000000
000000000000000000000000
000000000088888888888888
111111111121111211111111
000000000000011111111111
000000000000000000000000
000000000000000000000000
888888888888888888888888
000000000000110111111211
000000000000000000000000
432232143221212212111111
000000000000000000000000
000000000000001111121111
000000000000000000000000
000000000000000000000000
111111211111111111112112
;
proc print data=demo;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 14 May 2024 05:06:49 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2024-05-14T05:06:49Z</dc:date>
    <item>
      <title>How to find a particular number from the filed which has series of 24 numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-particular-number-from-the-filed-which-has-series/m-p/928235#M365208</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a variable called history which has 24 numbers in it.&lt;/P&gt;&lt;P&gt;example (111221122121112121111121) - qualifies as Ever2 /455444443211113212211221 qualifies in Ever 4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you advise the logic to use to create flags like in the 'history' variable if it has numbers &amp;gt; 2( that comes in the complete series anytime not looking at the position)then Ever2 .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I mean in that a particular variable i have 1 2months data...if the history variable has&amp;nbsp; &amp;gt; 2 then Ever2=1, if it has &amp;gt;4 then Ever 4= 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;examples of the records for history.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;111111111111111111111111&lt;BR /&gt;888887654323221211111111&lt;BR /&gt;000000000000000000000000&lt;BR /&gt;000000000000000000000000&lt;BR /&gt;000000000088888888888888&lt;BR /&gt;111111111121111211111111&lt;BR /&gt;000000000000011111111111&lt;BR /&gt;000000000000000000000000&lt;BR /&gt;000000000000000000000000&lt;BR /&gt;888888888888888888888888&lt;BR /&gt;000000000000110111111211&lt;BR /&gt;000000000000000000000000&lt;BR /&gt;432232143221212212111111&lt;BR /&gt;000000000000000000000000&lt;BR /&gt;000000000000001111121111&lt;BR /&gt;000000000000000000000000&lt;BR /&gt;000000000000000000000000&lt;BR /&gt;111111211111111111112112&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 04:21:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-particular-number-from-the-filed-which-has-series/m-p/928235#M365208</guid>
      <dc:creator>BaalaRaaji</dc:creator>
      <dc:date>2024-05-14T04:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a particular number from the filed which has series of 24 numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-particular-number-from-the-filed-which-has-series/m-p/928238#M365209</link>
      <description>&lt;P&gt;Not sure why&amp;nbsp;&lt;SPAN&gt;111221122121112121111121 qualifies as Ever2=1 given your rule is "numbers &amp;gt; 2"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if below returns what you want. Else just amend the list of digits to search for.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data demo;
  input digits:$24.;
  Ever4 = (findc(digits,'56789')&amp;gt;0);
  Ever2 = (Ever4=0 and findc(digits,'34')&amp;gt;0);
  datalines;
111221122121112121113121
455444443211113212211221 
111111111111111111111111
888887654323221211111111
000000000000000000000000
000000000000000000000000
000000000088888888888888
111111111121111211111111
000000000000011111111111
000000000000000000000000
000000000000000000000000
888888888888888888888888
000000000000110111111211
000000000000000000000000
432232143221212212111111
000000000000000000000000
000000000000001111121111
000000000000000000000000
000000000000000000000000
111111211111111111112112
;
proc print data=demo;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 May 2024 05:06:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-particular-number-from-the-filed-which-has-series/m-p/928238#M365209</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-05-14T05:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to find a particular number from the filed which has series of 24 numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-particular-number-from-the-filed-which-has-series/m-p/928241#M365211</link>
      <description>Working, Thank you</description>
      <pubDate>Tue, 14 May 2024 05:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-a-particular-number-from-the-filed-which-has-series/m-p/928241#M365211</guid>
      <dc:creator>BaalaRaaji</dc:creator>
      <dc:date>2024-05-14T05:40:18Z</dc:date>
    </item>
  </channel>
</rss>

