<?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: Help with getting Last Status Each month in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211745#M52299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me rephrase your rules, correct me if I am wrong:&lt;/P&gt;&lt;P&gt;1. You want the last status of each month, of each id. so you will have an output on id/month level.&lt;/P&gt;&lt;P&gt;2. if multiple status occur on the last available day of certain month, the status will be chosen by this order: A, S, D.&lt;/P&gt;&lt;P&gt;So in summary, for the same id, same month,&amp;nbsp; if status occurs on different days, the last day triumphs; if they happen on the same last day, A triumphs S triumphs D.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your data,&lt;/P&gt;&lt;P&gt;1 20150110 A&lt;/P&gt;&lt;P&gt;1 20150118 S&lt;/P&gt;&lt;P&gt;per your rules, Shouldn't 'S' be the last status? However, you present this as your outcome:&lt;/P&gt;&lt;P&gt; 1 Jan15 A&lt;/P&gt;&lt;P&gt;I must ask WHY.&amp;nbsp; Please sort out your rules before everyone here breaks their legs running circles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Mar 2015 13:23:03 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2015-03-27T13:23:03Z</dc:date>
    <item>
      <title>Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211731#M52285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input id $&amp;nbsp; dt yyyymm8.&amp;nbsp; status $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 20141203&amp;nbsp; D&lt;/P&gt;&lt;P&gt;1 20141210&amp;nbsp; D&lt;/P&gt;&lt;P&gt;1 20141210&amp;nbsp; A&lt;/P&gt;&lt;P&gt;1 20141210&amp;nbsp; S&lt;/P&gt;&lt;P&gt;2 20150104&amp;nbsp; A&lt;/P&gt;&lt;P&gt;2 20150115&amp;nbsp; D&lt;/P&gt;&lt;P&gt;2 20150118&amp;nbsp; S&lt;/P&gt;&lt;P&gt;2 20150118&amp;nbsp; D&lt;/P&gt;&lt;P&gt;2 20150118&amp;nbsp; A&lt;/P&gt;&lt;P&gt;3 20150210&amp;nbsp; S&lt;/P&gt;&lt;P&gt;3 20150213&amp;nbsp; D&lt;/P&gt;&lt;P&gt;3 20150223&amp;nbsp; D&lt;/P&gt;&lt;P&gt;3 20150223&amp;nbsp; S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want last status Each month for each id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are 3 Statuses(A, D, S)&amp;nbsp; on the same day I want the following seq:&amp;nbsp; A first, S and then D.&lt;/P&gt;&lt;P&gt;So my output should look like:&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; YrMn&amp;nbsp;&amp;nbsp;&amp;nbsp; Last_Status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp; 201412&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A &lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp; 201501&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp; 201502&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 07:59:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211731#M52285</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2015-03-27T07:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211732#M52286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want the last status from each ID on the same day ? or do you want to sort the sequence. ? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 08:22:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211732#M52286</guid>
      <dc:creator>viveklanka</dc:creator>
      <dc:date>2015-03-27T08:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211733#M52287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want it based on the sequence if there are 3 statuses on same day.&amp;nbsp; But my output should for each ID each month what is last status. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 08:44:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211733#M52287</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2015-03-27T08:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211734#M52288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So&lt;/P&gt;&lt;P&gt;as I understand&lt;/P&gt;&lt;P&gt;If there are three statuses on the same day then you want the last status of the month. for each ID.&lt;/P&gt;&lt;P&gt;then your ouput will be like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 20141210&amp;nbsp; S&lt;/P&gt;&lt;P&gt;2 20150118&amp;nbsp; A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as there are no three statuses for the ID 3 it wouldnt be included.,&lt;/P&gt;&lt;P&gt;Or even if there are no three statuses on the same day you want the last status of the user?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 08:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211734#M52288</guid>
      <dc:creator>viveklanka</dc:creator>
      <dc:date>2015-03-27T08:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211735#M52289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not absolutely sure of your sample and your explanation, but just get started:&lt;BR /&gt;data have;&lt;/P&gt;&lt;P&gt;input id $&amp;nbsp; dt yymmdd10.&amp;nbsp; status $;&lt;BR /&gt;format dt yymmdd10.;&lt;/P&gt;&lt;P&gt;cards;&lt;BR /&gt;1 20141203&amp;nbsp; D&lt;BR /&gt;1 20141210&amp;nbsp; D&lt;BR /&gt;1 20141210&amp;nbsp; A&lt;BR /&gt;1 20141210&amp;nbsp; S&lt;BR /&gt;2 20150104&amp;nbsp; A&lt;BR /&gt;2 20150115&amp;nbsp; D&lt;BR /&gt;2 20150118&amp;nbsp; S&lt;BR /&gt;2 20150118&amp;nbsp; D&lt;BR /&gt;2 20150118&amp;nbsp; A&lt;BR /&gt;3 20150210&amp;nbsp; S&lt;BR /&gt;3 20150213&amp;nbsp; D&lt;BR /&gt;3 20150223&amp;nbsp; D&lt;BR /&gt;3 20150223&amp;nbsp; S&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt; do until(last.id);&lt;BR /&gt;&amp;nbsp; set have;&lt;BR /&gt;&amp;nbsp; by id;&lt;BR /&gt; end;&lt;/P&gt;&lt;P&gt; format dt monyy5.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naveen Srinivasan&lt;/P&gt;&lt;P&gt;L&amp;amp;T Infotech&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 09:48:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211735#M52289</guid>
      <dc:creator>naveen_srini</dc:creator>
      <dc:date>2015-03-27T09:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211736#M52290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My Output is as follow: ID&amp;nbsp; YrMn&amp;nbsp;&amp;nbsp;&amp;nbsp; Last_Status 1&amp;nbsp; 201412&amp;nbsp;&amp;nbsp;&amp;nbsp; A 2&amp;nbsp; 201501&amp;nbsp;&amp;nbsp;&amp;nbsp; A 3&amp;nbsp; 201502&amp;nbsp;&amp;nbsp;&amp;nbsp; S I you look at the data data there were 3 statues for ID =3 on same day. I need above output based on sample data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 09:49:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211736#M52290</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2015-03-27T09:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211737#M52291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Naveen. I want for each ID&amp;nbsp; each month their last status. SO if suppose ID 1 has in the month of December 3 statuses A, D,&amp;nbsp; S. I want last status for December in that seq (there may be in several days in the same month) but I want last status for that month based on seq.&amp;nbsp; There may be multiple Statuses on last day in the given month.&amp;nbsp; Also for the same ID = 1 if there may be data for Jan 2015, I want last status in Jan 2015 , or if there may be data for Feb 2015 I want last status for that ID in Feb 2015 and so on...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 09:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211737#M52291</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2015-03-27T09:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211738#M52292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data have; input id $&amp;nbsp; dt yymmdd10.&amp;nbsp; status $; format dt yymmdd10.; cards; 1 20141203&amp;nbsp; D 1 20141210&amp;nbsp; D 1 20141210&amp;nbsp; A 1 20141210&amp;nbsp; S 1 20150110&amp;nbsp; A 1 20150118&amp;nbsp; S 2 20150104&amp;nbsp; A 2 20150115&amp;nbsp; D 2 20150118&amp;nbsp; S 2 20150118&amp;nbsp; D 2 20150118&amp;nbsp; A 3 20150210&amp;nbsp; S 3 20150213&amp;nbsp; D 3 20150223&amp;nbsp; D 3 20150223&amp;nbsp; S ; If I have the data as above: I want last status Each month for each id.( There may be multiple months of data for one ID) If there are 3 Statuses(A, D, S)&amp;nbsp; on the same day I want the following seq:&amp;nbsp; A first, S and then D. So my output should look like: ID&amp;nbsp; YrMn&amp;nbsp;&amp;nbsp;&amp;nbsp; Last_Status 1&amp;nbsp; 201412&amp;nbsp;&amp;nbsp;&amp;nbsp; A 1&amp;nbsp; 201501&amp;nbsp;&amp;nbsp;&amp;nbsp; A 2&amp;nbsp; 201501&amp;nbsp;&amp;nbsp;&amp;nbsp; A 3&amp;nbsp; 201502&amp;nbsp;&amp;nbsp;&amp;nbsp; S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 10:42:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211738#M52292</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2015-03-27T10:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211739#M52293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input id $&amp;nbsp; dt yymmdd10.&amp;nbsp; status $;&lt;/P&gt;&lt;P&gt;format dt yymmdd10.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 20141203&amp;nbsp; D&lt;/P&gt;&lt;P&gt;1 20141210&amp;nbsp; D&lt;/P&gt;&lt;P&gt;1 20141210&amp;nbsp; A&lt;/P&gt;&lt;P&gt;1 20141210&amp;nbsp; S&lt;/P&gt;&lt;P&gt;1 20150110&amp;nbsp; A&lt;/P&gt;&lt;P&gt;1 20150118&amp;nbsp; S&lt;/P&gt;&lt;P&gt;2 20150104&amp;nbsp; A&lt;/P&gt;&lt;P&gt;2 20150115&amp;nbsp; D&lt;/P&gt;&lt;P&gt;2 20150118&amp;nbsp; S&lt;/P&gt;&lt;P&gt;2 20150118&amp;nbsp; D&lt;/P&gt;&lt;P&gt;2 20150118&amp;nbsp; A&lt;/P&gt;&lt;P&gt;3 20150210&amp;nbsp; S&lt;/P&gt;&lt;P&gt;3 20150213&amp;nbsp; D&lt;/P&gt;&lt;P&gt;3 20150223&amp;nbsp; D&lt;/P&gt;&lt;P&gt;3 20150223&amp;nbsp; S&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want for each month for each ID Last status . There may be multiple months of data for one ID.&amp;nbsp; If there are multiple statuses on the same day then I want the seq to be (A, S, and D).&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 10:46:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211739#M52293</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2015-03-27T10:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211740#M52294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a new variable that contains the month of the date.&lt;/P&gt;&lt;P&gt;Sort by id, month and date (and by status if you have a preference which status to take when more than one happens on one single day).&lt;/P&gt;&lt;P&gt;Then use "if last.month;".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 11:54:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211740#M52294</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-03-27T11:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211741#M52295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kurt.&amp;nbsp; I tried but I am not getting correct output.&lt;/P&gt;&lt;P&gt;Below is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input id $&amp;nbsp; dt yymmdd10.&amp;nbsp; status $;&lt;/P&gt;&lt;P&gt;format dt yymmdd10.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 20141203&amp;nbsp; D&lt;/P&gt;&lt;P&gt;1 20141210&amp;nbsp; D&lt;/P&gt;&lt;P&gt;1 20141210&amp;nbsp; A&lt;/P&gt;&lt;P&gt;1 20141210&amp;nbsp; S&lt;/P&gt;&lt;P&gt;1 20150110&amp;nbsp; A&lt;/P&gt;&lt;P&gt;1 20150118&amp;nbsp; S&lt;/P&gt;&lt;P&gt;2 20150104&amp;nbsp; A&lt;/P&gt;&lt;P&gt;2 20150115&amp;nbsp; D&lt;/P&gt;&lt;P&gt;2 20150118&amp;nbsp; S&lt;/P&gt;&lt;P&gt;2 20150118&amp;nbsp; D&lt;/P&gt;&lt;P&gt;2 20150118&amp;nbsp; A&lt;/P&gt;&lt;P&gt;3 20150210&amp;nbsp; S&lt;/P&gt;&lt;P&gt;3 20150213&amp;nbsp; D&lt;/P&gt;&lt;P&gt;3 20150223&amp;nbsp; D&lt;/P&gt;&lt;P&gt;3 20150223&amp;nbsp; S&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format mnth monyy5.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; mnth = dt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if status = 'A' then seq = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if status = 'S' then seq = 2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if status = 'D'&amp;nbsp; then seq = 3;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data = have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by id mnth descending seq;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if last.mnth;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by id mnth descending seq;&lt;/P&gt;&lt;P&gt;&amp;nbsp; keep id mnth status;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the output as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp; mnth&amp;nbsp;&amp;nbsp;&amp;nbsp; Status&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; Jan15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; Jan15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp; Feb15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 12:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211741#M52295</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2015-03-27T12:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211742#M52296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your problem is here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mnth = dt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There you create just another date variable, only that the days are hidden by the format!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to create a month variable with&lt;/P&gt;&lt;P&gt;mnth = month(dt);&lt;/P&gt;&lt;P&gt;If years are also important, do&lt;/P&gt;&lt;P&gt;mnth = substr(put(dt,yymmddn8.),1,6);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data = have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by id mnth dt descending seq;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by id mnth;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if last.mnth;&lt;/P&gt;&lt;P&gt;&amp;nbsp; keep id mnth status;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 12:41:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211742#M52296</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-03-27T12:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211743#M52297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kurt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 12:48:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211743#M52297</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2015-03-27T12:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211744#M52298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is hard to understand what you want. Suppose I understand what you mean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data have;
input id $&amp;nbsp; dt : yymmdd10.&amp;nbsp; status $;
format dt yymmdd10.;
cards;
1 20141203&amp;nbsp; D
1 20141210&amp;nbsp; D
1 20141210&amp;nbsp; A
1 20141210&amp;nbsp; S
1 20150110&amp;nbsp; A
1 20150118&amp;nbsp; S
2 20150104&amp;nbsp; A
2 20150115&amp;nbsp; D
2 20150118&amp;nbsp; S
2 20150118&amp;nbsp; D
2 20150118&amp;nbsp; A
3 20150210&amp;nbsp; S
3 20150213&amp;nbsp; D
3 20150223&amp;nbsp; D
3 20150223&amp;nbsp; S
;
data have;
&amp;nbsp; set have;
&amp;nbsp; year=year(dt);month=month(dt);
&amp;nbsp; if status = 'A' then seq = 1;
&amp;nbsp; else if status = 'S' then seq = 2;
&amp;nbsp; else if status = 'D'&amp;nbsp; then seq = 3;
run;
proc sort data=have;by id year month dt descending seq;run;
data want;
 set have;
 by id year month ;
 if last.month;
 format dt monyy7.;
 drop year month seq;
run;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 13:04:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211744#M52298</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-03-27T13:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211745#M52299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me rephrase your rules, correct me if I am wrong:&lt;/P&gt;&lt;P&gt;1. You want the last status of each month, of each id. so you will have an output on id/month level.&lt;/P&gt;&lt;P&gt;2. if multiple status occur on the last available day of certain month, the status will be chosen by this order: A, S, D.&lt;/P&gt;&lt;P&gt;So in summary, for the same id, same month,&amp;nbsp; if status occurs on different days, the last day triumphs; if they happen on the same last day, A triumphs S triumphs D.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your data,&lt;/P&gt;&lt;P&gt;1 20150110 A&lt;/P&gt;&lt;P&gt;1 20150118 S&lt;/P&gt;&lt;P&gt;per your rules, Shouldn't 'S' be the last status? However, you present this as your outcome:&lt;/P&gt;&lt;P&gt; 1 Jan15 A&lt;/P&gt;&lt;P&gt;I must ask WHY.&amp;nbsp; Please sort out your rules before everyone here breaks their legs running circles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 13:23:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211745#M52299</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-03-27T13:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211746#M52300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pp2014,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess this will help you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input id $&amp;nbsp; dt yymmdd10.&amp;nbsp; status $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 20141203&amp;nbsp; D&lt;/P&gt;&lt;P&gt;1 20141210&amp;nbsp; D&lt;/P&gt;&lt;P&gt;1 20141210&amp;nbsp; A&lt;/P&gt;&lt;P&gt;1 20141210&amp;nbsp; S&lt;/P&gt;&lt;P&gt;2 20150104&amp;nbsp; A&lt;/P&gt;&lt;P&gt;2 20150115&amp;nbsp; D&lt;/P&gt;&lt;P&gt;2 20150118&amp;nbsp; S&lt;/P&gt;&lt;P&gt;2 20150118&amp;nbsp; D&lt;/P&gt;&lt;P&gt;2 20150118&amp;nbsp; A&lt;/P&gt;&lt;P&gt;3 20150210&amp;nbsp; S&lt;/P&gt;&lt;P&gt;3 20150213&amp;nbsp; D&lt;/P&gt;&lt;P&gt;3 20150223&amp;nbsp; D&lt;/P&gt;&lt;P&gt;3 20150223&amp;nbsp; S&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data int1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if status eq 'D' then temp1=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if status eq 'S' then temp1=2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if status eq 'A' then temp1=3;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort&lt;/P&gt;&lt;P&gt;&amp;nbsp; data=int1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by id dt temp1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data int2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set int1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if last.id then temp2=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format dt monyy7.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set int2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; where temp2=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; drop temp1 temp2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yogesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 15:48:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211746#M52300</guid>
      <dc:creator>shubhayog</dc:creator>
      <dc:date>2015-03-27T15:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211747#M52301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks lot everybody for help...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 20:21:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211747#M52301</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2015-03-27T20:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211748#M52302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you got your correct answer? if yes, please mark it. If no, please explain why. BTW, I have raised a question in order to help you, still waiting for your response.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 20:24:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211748#M52302</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-03-27T20:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211749#M52303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hai.Kuo,&lt;/P&gt;&lt;P&gt;I got it working using following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data have;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;input id $&amp;nbsp; dt yymmdd10.&amp;nbsp; status $;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;format dt yymmdd10.;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;cards;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;1 20141203&amp;nbsp; D&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;1 20141210&amp;nbsp; D&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;1 20141210&amp;nbsp; A&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;1 20141210&amp;nbsp; S&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;1 20150110&amp;nbsp; A&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;1 20150118&amp;nbsp; S&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;2 20150104&amp;nbsp; A&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;2 20150115&amp;nbsp; D&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;2 20150118&amp;nbsp; S&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;2 20150118&amp;nbsp; D&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;2 20150118&amp;nbsp; A&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;3 20150210&amp;nbsp; S&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;3 20150213&amp;nbsp; D&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;3 20150223&amp;nbsp; D&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;3 20150223&amp;nbsp; S&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data have;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;mnth = substr(put(dt,yymmddn8.),1,6);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; if status = 'A' then seq = 1;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; else if status = 'S' then seq = 2;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; else if status = 'D'&amp;nbsp; then seq = 3;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc sort data = have;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; by id mnth descending seq;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data want;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; if last.mnth;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; by id mnth descending seq;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; keep id mnth status;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Output was as follows:&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp; mnth&amp;nbsp;&amp;nbsp;&amp;nbsp; Status&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 201412&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 201501&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 201501&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp; 201502&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 23:30:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211749#M52303</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2015-03-27T23:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting Last Status Each month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211750#M52304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for getting back to me. So from reading your code, what I have gathered is that status are evaluated on monthly basis, you don't really care what status happens on which day (therefore, using Last status is kinda misleading, and discussing multiple status on the same day is meaningless) rather, you only want to know if there is A, S or D in certain month, and output A if there is A, else output S if there is S but no A, output D there is D with no A/D.&amp;nbsp; Let me present you more extreme example that your code does:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; id $&amp;nbsp; dt &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;yymmdd10.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp; status $;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; dt &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;yymmdd10.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1 20141203&amp;nbsp; A&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1 20141210&amp;nbsp; D&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1 20141210&amp;nbsp; D&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1 20141210&amp;nbsp; D&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1 20150110&amp;nbsp; A&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;1 20150118&amp;nbsp; S&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2 20150104&amp;nbsp; A&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2 20150115&amp;nbsp; D&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2 20150118&amp;nbsp; D&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2 20150118&amp;nbsp; D&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2 20150118&amp;nbsp; D&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;3 20150210&amp;nbsp; A&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;3 20150213&amp;nbsp; S&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;3 20150223&amp;nbsp; S&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;3 20150223&amp;nbsp; S&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;mnth = substr(put(dt,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;yymmddn8.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;),&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;6&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; status = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'A'&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; seq = &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;else&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; status = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'S'&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; seq = &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;else&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; status = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'D'&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; seq = &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;3&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;sort&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; = have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; id mnth &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;descending&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; seq;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; last.mnth;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; id mnth &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;descending&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; seq;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;keep&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; id mnth status;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is what you are getting:&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE cellpadding="0" cellspacing="0" class="table"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="b rowheader" nowrap="nowrap" style="text-align: right;"&gt;1&lt;/TD&gt;&lt;TD class="b data" nowrap="nowrap" style="text-align: left;"&gt;1&lt;/TD&gt;&lt;TD class="b data" nowrap="nowrap" style="text-align: left;"&gt;A&lt;/TD&gt;&lt;TD class="b data" nowrap="nowrap" style="text-align: left;"&gt;201412&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="b rowheader" nowrap="nowrap" style="text-align: right;"&gt;2&lt;/TD&gt;&lt;TD class="b data" nowrap="nowrap" style="text-align: left;"&gt;1&lt;/TD&gt;&lt;TD class="b data" nowrap="nowrap" style="text-align: left;"&gt;A&lt;/TD&gt;&lt;TD class="b data" nowrap="nowrap" style="text-align: left;"&gt;201501&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="b rowheader" nowrap="nowrap" style="text-align: right;"&gt;3&lt;/TD&gt;&lt;TD class="b data" nowrap="nowrap" style="text-align: left;"&gt;2&lt;/TD&gt;&lt;TD class="b data" nowrap="nowrap" style="text-align: left;"&gt;A&lt;/TD&gt;&lt;TD class="b data" nowrap="nowrap" style="text-align: left;"&gt;201501&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="b rowheader" nowrap="nowrap" style="text-align: right;"&gt;4&lt;/TD&gt;&lt;TD class="b data" nowrap="nowrap" style="text-align: left;"&gt;3&lt;/TD&gt;&lt;TD class="b data" nowrap="nowrap" style="text-align: left;"&gt;A&lt;/TD&gt;&lt;TD class="b data" nowrap="nowrap" style="text-align: left;"&gt;201502&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meaning as long as there is a 'A' occurred within a month, regardless which day of the month, first day or last day, regardless whether there are 'S' or 'D', your code will ALWAYS output it. Make sure this is what you want. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if indeed this is what you need, you can also simply resort to a SQL solution:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; id, put(dt,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;yymon7.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; yymon, &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;case&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; sum(status=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'A'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;)&amp;gt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'A'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; sum(status=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'S'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;)&amp;gt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'S'&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; sum(status=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'D'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;)&amp;gt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'D'&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; status&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;group&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; id, calculated yymon;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Mar 2015 00:51:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-Last-Status-Each-month/m-p/211750#M52304</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-03-28T00:51:26Z</dc:date>
    </item>
  </channel>
</rss>

