<?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 Not Enrolled more than once in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Not-Enrolled-more-than-once/m-p/783620#M249915</link>
    <description>&lt;P&gt;I have a dataset with Account Number that can be enrolled in a program. The data-set is monthly data. If it is enrolled the Enrolled_Flag = 1 else it is 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An account can only be enrolled at most once. How would I detect data issues with the file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Account AAAA is okay, enrolled in second month.&lt;/P&gt;&lt;P&gt;Account_Number, Year_Month, Enrolled_Flag&lt;/P&gt;&lt;P&gt;AAAA, 202101, 0&lt;/P&gt;&lt;P&gt;AAAA, 202102,1&lt;/P&gt;&lt;P&gt;AAAA, 202103,1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Account BBBB is okay, enrolled and derollled in 4th month&lt;/P&gt;&lt;P&gt;Account_Number, Year_Month, Enrolled_Flag&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Account CCC is okay always enrolled&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Account DDDD is NOT okay, enrolled in 2nd month and then then enrolled in 4th month.&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Dec 2021 14:50:49 GMT</pubDate>
    <dc:creator>hellind</dc:creator>
    <dc:date>2021-12-02T14:50:49Z</dc:date>
    <item>
      <title>Not Enrolled more than once</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Not-Enrolled-more-than-once/m-p/783620#M249915</link>
      <description>&lt;P&gt;I have a dataset with Account Number that can be enrolled in a program. The data-set is monthly data. If it is enrolled the Enrolled_Flag = 1 else it is 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An account can only be enrolled at most once. How would I detect data issues with the file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Account AAAA is okay, enrolled in second month.&lt;/P&gt;&lt;P&gt;Account_Number, Year_Month, Enrolled_Flag&lt;/P&gt;&lt;P&gt;AAAA, 202101, 0&lt;/P&gt;&lt;P&gt;AAAA, 202102,1&lt;/P&gt;&lt;P&gt;AAAA, 202103,1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Account BBBB is okay, enrolled and derollled in 4th month&lt;/P&gt;&lt;P&gt;Account_Number, Year_Month, Enrolled_Flag&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Account CCC is okay always enrolled&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Account DDDD is NOT okay, enrolled in 2nd month and then then enrolled in 4th month.&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 14:50:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Not-Enrolled-more-than-once/m-p/783620#M249915</guid>
      <dc:creator>hellind</dc:creator>
      <dc:date>2021-12-02T14:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Not Enrolled more than once</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Not-Enrolled-more-than-once/m-p/783623#M249918</link>
      <description>&lt;P&gt;Something like this, I think:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  by account enrolled notsorted;
  if first.account then
    n=enrolled;
  else if first.enrolled then
    n+enrolled;
  if last.account;
  if n&amp;gt;1 then
    flag='ERROR';
  else &lt;BR /&gt;    flag=' ';
  keep account flag;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Dec 2021 14:15:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Not-Enrolled-more-than-once/m-p/783623#M249918</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2021-12-02T14:15:53Z</dc:date>
    </item>
  </channel>
</rss>

