<?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 create flags based on change from one record to other and no change in score from one rec in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-flags-based-on-change-from-one-record-to-other-and/m-p/543517#M150260</link>
    <description>&lt;P&gt;in your want should this&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; border-spacing: 0px; box-sizing: inherit; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;" border="0" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY style="box-sizing: inherit;"&gt;
&lt;TR style="box-sizing: inherit;"&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;122&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;2&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;14&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;be this&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; border-spacing: 0px; box-sizing: inherit; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;" border="0" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY style="box-sizing: inherit;"&gt;
&lt;TR style="box-sizing: inherit;"&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;122&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;2&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;14&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;Y&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Fri, 15 Mar 2019 13:17:43 GMT</pubDate>
    <dc:creator>VDD</dc:creator>
    <dc:date>2019-03-15T13:17:43Z</dc:date>
    <item>
      <title>how to create flags based on change from one record to other and no change in score from one record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-flags-based-on-change-from-one-record-to-other-and/m-p/543514#M150257</link>
      <description>&lt;P&gt;I want to create 2 flags: one is if there is change of more than 5 points between recs and another flag if there is no change in score from recs to another 3 consecutive recs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not figuring it out on how to do this and need help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Required flag1 and flag2 and need something like below&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;PID&lt;/TD&gt;&lt;TD&gt;recs&lt;/TD&gt;&lt;TD&gt;score&lt;/TD&gt;&lt;TD&gt;flag1&lt;/TD&gt;&lt;TD&gt;flag2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;121&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;121&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;121&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;121&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;121&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;122&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;122&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;122&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;24&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;122&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;34&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;122&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;122&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 15 Mar 2019 13:06:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-flags-based-on-change-from-one-record-to-other-and/m-p/543514#M150257</guid>
      <dc:creator>noda6003</dc:creator>
      <dc:date>2019-03-15T13:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to create flags based on change from one record to other and no change in score from one rec</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-flags-based-on-change-from-one-record-to-other-and/m-p/543517#M150260</link>
      <description>&lt;P&gt;in your want should this&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; border-spacing: 0px; box-sizing: inherit; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;" border="0" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY style="box-sizing: inherit;"&gt;
&lt;TR style="box-sizing: inherit;"&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;122&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;2&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;14&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;be this&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; border-spacing: 0px; box-sizing: inherit; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;" border="0" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY style="box-sizing: inherit;"&gt;
&lt;TR style="box-sizing: inherit;"&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;122&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;2&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;14&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;Y&lt;/TD&gt;
&lt;TD style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; box-sizing: inherit; line-height: 20px; word-break: normal; padding: 2.5px 5px 2.5px 5px; margin: 0px; border: 1px solid #eaeaea;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 15 Mar 2019 13:17:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-flags-based-on-change-from-one-record-to-other-and/m-p/543517#M150260</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-03-15T13:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to create flags based on change from one record to other and no change in score from one rec</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-flags-based-on-change-from-one-record-to-other-and/m-p/543519#M150261</link>
      <description>&lt;P&gt;It should be as per pid.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 13:19:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-flags-based-on-change-from-one-record-to-other-and/m-p/543519#M150261</guid>
      <dc:creator>noda6003</dc:creator>
      <dc:date>2019-03-15T13:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to create flags based on change from one record to other and no change in score from one rec</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-flags-based-on-change-from-one-record-to-other-and/m-p/543522#M150262</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* UNTESTED CODE */
Data want;
    set have;
    Prev_id=lag(pid);
    Prev_id2=lag2(pid);
    prev_score=lag(score);
    prev_score2=lag2(score);
    if score-prev_score&amp;gt;5 and pid=prev_id then flag1='Y';
    if score=prev_score and score=prev_score2 
        and pid=prev_id and pid=prev_id2 then flag2='Y';
run;
    &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Mar 2019 13:21:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-flags-based-on-change-from-one-record-to-other-and/m-p/543522#M150262</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-15T13:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to create flags based on change from one record to other and no change in score from one rec</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-flags-based-on-change-from-one-record-to-other-and/m-p/543530#M150264</link>
      <description>&lt;P&gt;&amp;nbsp;to mention is somehow should work for improving and worsening scores. so in the below for 121 it has 9 and decreased the next recs to 2 and it needs to have flag. also if it has same score 3 consecutive times than the second 2 should have flags as Y- excluding the first&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;PID&lt;/TD&gt;&lt;TD&gt;recs&lt;/TD&gt;&lt;TD&gt;score&lt;/TD&gt;&lt;TD&gt;flag1&lt;/TD&gt;&lt;TD&gt;flag2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;121&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;121&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;121&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;121&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;122&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;122&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;122&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;122&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;122&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 15 Mar 2019 13:36:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-flags-based-on-change-from-one-record-to-other-and/m-p/543530#M150264</guid>
      <dc:creator>noda6003</dc:creator>
      <dc:date>2019-03-15T13:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to create flags based on change from one record to other and no change in score from one rec</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-flags-based-on-change-from-one-record-to-other-and/m-p/543535#M150265</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;to mention is somehow should work for improving and worsening scores. so in the below for 121 it has 9 and decreased the next recs to 2 and it needs to have flag.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a trivial change to the code I provided. Please see if you can make the modification to the code yourself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;also if it has same score 3 consecutive times than the second 2 should have flags as Y- excluding the first&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sort the data backwards, then if you get a Y in flag2, then add a Y to the next record.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 13:44:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-flags-based-on-change-from-one-record-to-other-and/m-p/543535#M150265</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-15T13:44:30Z</dc:date>
    </item>
  </channel>
</rss>

