<?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 To find the last.Last.ReportDateIST in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/To-find-the-last-Last-ReportDateIST/m-p/299238#M63058</link>
    <description>&lt;P&gt;Sir , i want to find&amp;nbsp;last.Last.ReportDateIST,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i&amp;nbsp;submit this code its not happning&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input DumpKey AccountNumber DOSDateKey ReportDateIST ISTProductionDateKey BalanceAmount;&lt;BR /&gt;cards;&lt;BR /&gt;1012 1012-44340 20160723 2016-08-24 20160808 680.00&lt;BR /&gt;1012 1012-44340 20160723 2016-09-04 20160829 680.00&lt;BR /&gt;1012 1022-50216 20160808 2016-08-28 20160822 260.00&lt;BR /&gt;1012 1022-50216 20160808 2016-09-04 20160822 260.00&lt;BR /&gt;1012 1022-50216 20160808 2016-09-11 20160822 260.00&lt;BR /&gt;1012 1022-50216 20160808 2016-09-18 20160822 260.00&lt;BR /&gt;1012 1025-52296 20160613 2016-08-24 20160809 50.00&lt;BR /&gt;1012 1025-52296 20160613 2016-08-28 20160824 50.00&lt;BR /&gt;1012 1025-52296 20160613 2016-09-04 20160824 50.00&lt;BR /&gt;1012 1025-52296 20160613 2016-09-11 20160906 50.00&lt;BR /&gt;1012 1028-54976 20160812 2016-09-04 20160829 275.00&lt;BR /&gt;1012 1028-54976 20160812 2016-09-11 20160829 275.00&lt;BR /&gt;1012 1028-54976 20160812 2016-09-18 20160829 275.00&lt;BR /&gt;1012 1030-45842 20160831 2016-09-18 20160912 400.00&lt;BR /&gt;1012 1031-9713 20160720 2016-08-24 20160802 260.00&lt;BR /&gt;1012 1034-24465 20160817 2016-09-04 20160829 545.00&lt;BR /&gt;1012 1034-24465 20160817 2016-09-11 20160906 545.00&lt;BR /&gt;1012 1035-55036 20160816 2016-09-04 20160829 600.00&lt;BR /&gt;1012 1035-55036 20160816 2016-09-11 20160829 600.00&lt;BR /&gt;1012 1035-55036 20160816 2016-09-18 20160829 600.00&lt;BR /&gt;1012 1038-52437 20160615 2016-08-24 20160718 150.00&lt;BR /&gt;1012 1038-52437 20160615 2016-08-28 20160718 150.00&lt;BR /&gt;1012 1038-52437 20160615 2016-09-04 20160718 150.00&lt;BR /&gt;1012 1038-52437 20160615 2016-09-11 20160718 150.00&lt;BR /&gt;1012 1038-52437 20160615 2016-09-18 20160718 150.00&lt;BR /&gt;1012 1051-9319 20160802 2016-08-24 20160816 510.00&lt;BR /&gt;1012 1051-9319 20160802 2016-09-04 20160829 510.00&lt;BR /&gt;1012 1074-14760 20160816 2016-09-04 20160829 460.00&lt;BR /&gt;1012 1074-14760 20160816 2016-09-11 20160906 460.00&lt;BR /&gt;1012 1077-11576 20160611 2016-08-24 20160818 75.00&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SORT DATA=Have;&lt;BR /&gt;BY DUMPKEY ACCOUNTNUMBER DOSDATEKEY REPORTDATEIST ISTPRODUCTIONDATEKEY;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA Want;&lt;BR /&gt;SET Have;&lt;BR /&gt;BY DUMPKEY ACCOUNTNUMBER DOSDATEKEY REPORTDATEIST ISTPRODUCTIONDATEKEY;&lt;/P&gt;&lt;P&gt;IF LAST.REPORTDATEIST THEN&lt;BR /&gt;OUTPUT;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Sep 2016 10:51:59 GMT</pubDate>
    <dc:creator>sivastat08</dc:creator>
    <dc:date>2016-09-19T10:51:59Z</dc:date>
    <item>
      <title>To find the last.Last.ReportDateIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-find-the-last-Last-ReportDateIST/m-p/299238#M63058</link>
      <description>&lt;P&gt;Sir , i want to find&amp;nbsp;last.Last.ReportDateIST,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i&amp;nbsp;submit this code its not happning&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input DumpKey AccountNumber DOSDateKey ReportDateIST ISTProductionDateKey BalanceAmount;&lt;BR /&gt;cards;&lt;BR /&gt;1012 1012-44340 20160723 2016-08-24 20160808 680.00&lt;BR /&gt;1012 1012-44340 20160723 2016-09-04 20160829 680.00&lt;BR /&gt;1012 1022-50216 20160808 2016-08-28 20160822 260.00&lt;BR /&gt;1012 1022-50216 20160808 2016-09-04 20160822 260.00&lt;BR /&gt;1012 1022-50216 20160808 2016-09-11 20160822 260.00&lt;BR /&gt;1012 1022-50216 20160808 2016-09-18 20160822 260.00&lt;BR /&gt;1012 1025-52296 20160613 2016-08-24 20160809 50.00&lt;BR /&gt;1012 1025-52296 20160613 2016-08-28 20160824 50.00&lt;BR /&gt;1012 1025-52296 20160613 2016-09-04 20160824 50.00&lt;BR /&gt;1012 1025-52296 20160613 2016-09-11 20160906 50.00&lt;BR /&gt;1012 1028-54976 20160812 2016-09-04 20160829 275.00&lt;BR /&gt;1012 1028-54976 20160812 2016-09-11 20160829 275.00&lt;BR /&gt;1012 1028-54976 20160812 2016-09-18 20160829 275.00&lt;BR /&gt;1012 1030-45842 20160831 2016-09-18 20160912 400.00&lt;BR /&gt;1012 1031-9713 20160720 2016-08-24 20160802 260.00&lt;BR /&gt;1012 1034-24465 20160817 2016-09-04 20160829 545.00&lt;BR /&gt;1012 1034-24465 20160817 2016-09-11 20160906 545.00&lt;BR /&gt;1012 1035-55036 20160816 2016-09-04 20160829 600.00&lt;BR /&gt;1012 1035-55036 20160816 2016-09-11 20160829 600.00&lt;BR /&gt;1012 1035-55036 20160816 2016-09-18 20160829 600.00&lt;BR /&gt;1012 1038-52437 20160615 2016-08-24 20160718 150.00&lt;BR /&gt;1012 1038-52437 20160615 2016-08-28 20160718 150.00&lt;BR /&gt;1012 1038-52437 20160615 2016-09-04 20160718 150.00&lt;BR /&gt;1012 1038-52437 20160615 2016-09-11 20160718 150.00&lt;BR /&gt;1012 1038-52437 20160615 2016-09-18 20160718 150.00&lt;BR /&gt;1012 1051-9319 20160802 2016-08-24 20160816 510.00&lt;BR /&gt;1012 1051-9319 20160802 2016-09-04 20160829 510.00&lt;BR /&gt;1012 1074-14760 20160816 2016-09-04 20160829 460.00&lt;BR /&gt;1012 1074-14760 20160816 2016-09-11 20160906 460.00&lt;BR /&gt;1012 1077-11576 20160611 2016-08-24 20160818 75.00&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SORT DATA=Have;&lt;BR /&gt;BY DUMPKEY ACCOUNTNUMBER DOSDATEKEY REPORTDATEIST ISTPRODUCTIONDATEKEY;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA Want;&lt;BR /&gt;SET Have;&lt;BR /&gt;BY DUMPKEY ACCOUNTNUMBER DOSDATEKEY REPORTDATEIST ISTPRODUCTIONDATEKEY;&lt;/P&gt;&lt;P&gt;IF LAST.REPORTDATEIST THEN&lt;BR /&gt;OUTPUT;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 10:51:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-find-the-last-Last-ReportDateIST/m-p/299238#M63058</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2016-09-19T10:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: To find the last.Last.ReportDateIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-find-the-last-Last-ReportDateIST/m-p/299250#M63063</link>
      <description>&lt;P&gt;PLEASE take ONE little look at your log. Your have dataset is not created with meaningful dates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess your INPUT should look like that:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input DumpKey AccountNumber $ DOSDateKey ReportDateIST :YYMMDD10. ISTProductionDateKey BalanceAmount;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And you won't get less than the original 30 observations, as there are no repeats of all your BY variables.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 11:49:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-find-the-last-Last-ReportDateIST/m-p/299250#M63063</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-09-19T11:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: To find the last.Last.ReportDateIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-find-the-last-Last-ReportDateIST/m-p/299252#M63064</link>
      <description>&lt;P&gt;I have Handled -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ReportDateIST as a character string &amp;nbsp; $10. format &amp;nbsp;like "2016-08-24"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ISTProductionDateKey as a Numaric &amp;nbsp;11. &amp;nbsp;format &amp;nbsp;like "20160808"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how should i resolve this .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;should i change any format thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 11:58:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-find-the-last-Last-ReportDateIST/m-p/299252#M63064</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2016-09-19T11:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: To find the last.Last.ReportDateIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-find-the-last-Last-ReportDateIST/m-p/299254#M63066</link>
      <description>&lt;P&gt;Since you have several obvious dates in your data, I'd read them all into SAS date values:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input DumpKey AccountNumber $ DOSDateKey :yymmdd8. ReportDateIST :YYMMDD10. ISTProductionDateKey :yymmdd8. BalanceAmount;
format DOSDateKey ReportDateIST ISTProductionDateKey yymmddd10.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This then enables correct sorting etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What would your wanted output dataset look like?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 12:10:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-find-the-last-Last-ReportDateIST/m-p/299254#M63066</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-09-19T12:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: To find the last.Last.ReportDateIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-find-the-last-Last-ReportDateIST/m-p/299259#M63069</link>
      <description>&lt;P&gt;For the combination &amp;nbsp;(ACCOUNTNUMBER &amp;nbsp;DOSDATEKEY &amp;nbsp;&lt;STRONG&gt;REPORTDATEIST&lt;/STRONG&gt; &amp;nbsp;ISTPRODUCTIONDATEKEY), i want to find last &lt;STRONG&gt;Lastreportdate - Last.REPORTDATEIST thats it.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Siva&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 12:18:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-find-the-last-Last-ReportDateIST/m-p/299259#M63069</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2016-09-19T12:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: To find the last.Last.ReportDateIST</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-find-the-last-Last-ReportDateIST/m-p/299265#M63070</link>
      <description>&lt;P&gt;Sort&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;by ACCOUNTNUMBER  DOSDATEKEY  REPORTDATEIST;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;BY ACCOUNTNUMBER  DOSDATEKEY  REPORTDATEIST;
if last.REPORTDATEIST;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;in the data step.&lt;/P&gt;
&lt;P&gt;If that does not get your intended result, then you need to post the example of your wanted dataset to illustrate your requirement.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 12:37:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-find-the-last-Last-ReportDateIST/m-p/299265#M63070</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-09-19T12:37:47Z</dc:date>
    </item>
  </channel>
</rss>

