<?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: Sorting data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102516#M21433</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tested the code? Please show tests, results and desired output. - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Apr 2013 14:26:20 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2013-04-10T14:26:20Z</dc:date>
    <item>
      <title>Sorting data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102509#M21426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;all sas expert, pls help me..&lt;/P&gt;&lt;P&gt;pls view attached files for clearer view..my objective is to gain latest date..pls be informed that there are 2 code for each account..&lt;/P&gt;&lt;P&gt;code 780 - start date&lt;/P&gt;&lt;P&gt;code 660 - end date&lt;/P&gt;&lt;P&gt;i need to extract data from code 780 to code 660&lt;/P&gt;&lt;P&gt;for picture a, when we sort by date, it turned out that the sequence start from 2 code for 780 and 1 code from 660.&lt;/P&gt;&lt;P&gt;when i sort nodupkey descending by code and date, i manage to get latest date for each code ie. &lt;/P&gt;&lt;P&gt;code 780 - 20/11/2004 &lt;/P&gt;&lt;P&gt;code 660 - 6/8/2009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for picture b, when we sort by date, seems that the code is mix between code 780 and code 660..&lt;/P&gt;&lt;P&gt;if i sort nodupkey descending by code and date, my final date for code 780 is 1/12/2010..&lt;/P&gt;&lt;P&gt;However, My user insist if there is code 660 in between code 780, i need to choose the first code 780 which is 1/5/2009&lt;/P&gt;&lt;P&gt;not the latest date...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what the code i should use that can cater for both cases..no code 660 in between and code 660 in between..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to all sas programmer, pls help me to solve this issue..thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 16:44:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102509#M21426</guid>
      <dc:creator>Hhh111</dc:creator>
      <dc:date>2013-04-09T16:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102510#M21427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Things would be easier to understand with an example. Input (account, code, date) and expected output (account, ??). Use text, not pictures, please. - PG &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 17:34:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102510#M21427</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-04-09T17:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102511#M21428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What would you like the data to look like when you are done? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are examples of possible answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Keep a subset of the rows, keeping only the rows that begin and end a "picture".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create one row per "picture" holding both a starting date and an ending date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are not the only possible answers, and you can come up with any answer that you would like.&amp;nbsp; It might help if you specify the names of a few additional variables and what you would like done with those.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 17:35:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102511#M21428</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-04-09T17:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102512#M21429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for ur reply PGStats..&lt;/P&gt;&lt;P&gt;account : a (after sorting by date)&lt;/P&gt;&lt;P&gt;code.&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&lt;/P&gt;&lt;P&gt;780.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/3/2004.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ---------&amp;gt;.&amp;nbsp;&amp;nbsp; Expected output.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 780 (start date).&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/11/2004&lt;/P&gt;&lt;P&gt;780.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/11/2004.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 660 (end date).&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/8/2009&lt;/P&gt;&lt;P&gt;660.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/8/2009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After i sort nodupkey by descending date, the expected output is as above..i take the latest date for 780 code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Account : b (after sorting by date)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;code.&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Code.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;780.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/3/2004.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ---------&amp;gt;.&amp;nbsp;&amp;nbsp; Expected output.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 780 (start date).&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/3/2004&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;660.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/11/2004.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 660 (end date).&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10/10/2010&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;780.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/8/2008&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;660.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10/10/2010&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;The end date, i still pull the most latest one..but for 780 code, i cannot get the latest date (20/11/2004) because there are 660 in between 2 code of 780..my user insist if the code goes by that sequence, i need to take the oldest date for code 780 only..code 660 remain unchanged, means that still take the latest one..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i Hope u get the better picture and help me in solving this...tq&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 00:42:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102512#M21429</guid>
      <dc:creator>Hhh111</dc:creator>
      <dc:date>2013-04-10T00:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102513#M21430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your description of what you want and data doesn't seem to match. It sounds like you need a max/min function, not a sort, but you use the earliest 780 code rather than the latest.&lt;/P&gt;&lt;P&gt;Did you post what you have versus what you want?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try proc means or summary with code as your class and look for the max or min. You may need to reformat the data output.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 02:05:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102513#M21430</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-04-10T02:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102514#M21431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is what I would propose (asuming there are only two possible codes) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;data test;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;input account $ code date :ddmmyy.;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;format date ddmmyys10.;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;datalines;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;a 780.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/03/2004&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;a 780.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/11/2004&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;a 660.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 06/08/2009&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;b 780.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/03/2004&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;b 660.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/11/2004&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;b 780.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05/08/2008&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;b 780.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 06/08/2008&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;b 660.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10/10/2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;proc sort data=test; by account descending date ; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;data want(keep=account startDate endDate);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;do until(last.account);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set test; by account;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if code=660 then &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if missing(endDate) then endDate = date;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else oldEndDate = date;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if not missing(endDate) and missing(oldEndDate) then &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; startDate = date;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;output;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;format startDate endDate oldEndDate ddmmyys10.;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;proc print data=want; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems to work... Try it with more cases.&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 02:14:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102514#M21431</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-04-10T02:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102515#M21432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear PG,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i use that code,i'll get the latest date for each code&lt;/P&gt;&lt;P&gt;my concern is for account = b..because after sort descending by date,&lt;/P&gt;&lt;P&gt;the code=660 appear in between 2 code of 780..&lt;/P&gt;&lt;P&gt;if such cases, the date for 780 that i should extract is the old date..not the latest date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;different from account=a because the code=660 seems to appear at the bottom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 05:44:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102515#M21432</guid>
      <dc:creator>Hhh111</dc:creator>
      <dc:date>2013-04-10T05:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102516#M21433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tested the code? Please show tests, results and desired output. - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 14:26:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data/m-p/102516#M21433</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-04-10T14:26:20Z</dc:date>
    </item>
  </channel>
</rss>

