<?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 How to skip to next &amp;quot;by group&amp;quot; when processing records in data step? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-to-next-quot-by-group-quot-when-processing-records/m-p/186050#M35268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using "by group" processing for a healthcare claims dataset containing records sorted by member ID and service date to determine eligibility for my analysis dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I've determined if a particular member is eligible or ineligible, I output the member ID and an eligibility flag to a dataset and then no longer need to process the rest of the claim records for that member.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I skip to the first claim for the &lt;STRONG&gt;next&lt;/STRONG&gt; member in the dataset? I've tried RETURN, STOP and LEAVE statements with limited success.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Sep 2014 15:51:49 GMT</pubDate>
    <dc:creator>RobF</dc:creator>
    <dc:date>2014-09-04T15:51:49Z</dc:date>
    <item>
      <title>How to skip to next "by group" when processing records in data step?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-to-next-quot-by-group-quot-when-processing-records/m-p/186050#M35268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using "by group" processing for a healthcare claims dataset containing records sorted by member ID and service date to determine eligibility for my analysis dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I've determined if a particular member is eligible or ineligible, I output the member ID and an eligibility flag to a dataset and then no longer need to process the rest of the claim records for that member.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I skip to the first claim for the &lt;STRONG&gt;next&lt;/STRONG&gt; member in the dataset? I've tried RETURN, STOP and LEAVE statements with limited success.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 15:51:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-to-next-quot-by-group-quot-when-processing-records/m-p/186050#M35268</guid>
      <dc:creator>RobF</dc:creator>
      <dc:date>2014-09-04T15:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip to next "by group" when processing records in data step?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-to-next-quot-by-group-quot-when-processing-records/m-p/186051#M35269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using 'by group' processing, the simple answer is 'No'. The only way to skip obs in data step is to use point=, but then it is not compatible with 'by group'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You maybe able to do it using a Hash object, but then you need to read in all of the obs into Hash first, beat the purpose anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck,&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 16:03:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-to-next-quot-by-group-quot-when-processing-records/m-p/186051#M35269</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-09-04T16:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip to next "by group" when processing records in data step?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-to-next-quot-by-group-quot-when-processing-records/m-p/186052#M35270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This skips (if then delete) additional processing for the by group once ELIG is true.&amp;nbsp; The ELIG criteria in my example is N eq 2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;sort&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=sashelp.class &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=class;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; sex;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; elig;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; class;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; sex;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;if&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;not&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; first.sex &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; elig &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; delete;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;retain&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; elig &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;0&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; first.sex &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;do&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elig = &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;0&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;x&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; = &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;0&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;end&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; x + &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; x eq &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;do&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elig = &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;output&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;end&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 16:56:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-to-next-quot-by-group-quot-when-processing-records/m-p/186052#M35270</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-09-04T16:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip to next "by group" when processing records in data step?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-to-next-quot-by-group-quot-when-processing-records/m-p/186053#M35271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a matter of style and possibly readability ... I would replace the last 4 lines of the DATA step with 2 lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x eq 2;&lt;/P&gt;&lt;P&gt;elig = 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always, beauty is in the eye of the beholder.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 17:18:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-to-next-quot-by-group-quot-when-processing-records/m-p/186053#M35271</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-09-04T17:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip to next "by group" when processing records in data step?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-to-next-quot-by-group-quot-when-processing-records/m-p/186054#M35272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, this was very helpful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 17:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-to-next-quot-by-group-quot-when-processing-records/m-p/186054#M35272</guid>
      <dc:creator>RobF</dc:creator>
      <dc:date>2014-09-11T17:30:47Z</dc:date>
    </item>
  </channel>
</rss>

