<?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: Maximum date in a SAS dataset in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Maximum-date-in-a-SAS-dataset/m-p/36557#M9203</link>
    <description>Pass the file in a DATA step using SET statement, also use a RETAIN statement with the MAX function to keep track of the maximum value encountered for your date variable (assigning a new temporary or permanent SAS variable.  &lt;BR /&gt;
&lt;BR /&gt;
What's unclear is how you intend to use this information, either during the SAS session or after.  So, the next question to pose back to the OP:  what do you want to do with this information once you have it derived in a DATA step?&lt;BR /&gt;
&lt;BR /&gt;
Also, PROC SQL could be used to perform a similar process.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Mon, 04 Jan 2010 16:48:08 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2010-01-04T16:48:08Z</dc:date>
    <item>
      <title>Maximum date in a SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Maximum-date-in-a-SAS-dataset/m-p/36556#M9202</link>
      <description>How do I identify the latest date in a date variable of a dataset?  Is it possible to do it without sorting?&lt;BR /&gt;
Thanks,&lt;BR /&gt;
TJ</description>
      <pubDate>Mon, 04 Jan 2010 16:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Maximum-date-in-a-SAS-dataset/m-p/36556#M9202</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-01-04T16:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum date in a SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Maximum-date-in-a-SAS-dataset/m-p/36557#M9203</link>
      <description>Pass the file in a DATA step using SET statement, also use a RETAIN statement with the MAX function to keep track of the maximum value encountered for your date variable (assigning a new temporary or permanent SAS variable.  &lt;BR /&gt;
&lt;BR /&gt;
What's unclear is how you intend to use this information, either during the SAS session or after.  So, the next question to pose back to the OP:  what do you want to do with this information once you have it derived in a DATA step?&lt;BR /&gt;
&lt;BR /&gt;
Also, PROC SQL could be used to perform a similar process.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 04 Jan 2010 16:48:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Maximum-date-in-a-SAS-dataset/m-p/36557#M9203</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-01-04T16:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum date in a SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Maximum-date-in-a-SAS-dataset/m-p/36558#M9204</link>
      <description>Thanks for your reply.  I thought of MAX, but forgot retain.  I actually need to have the Max value during the whole datastep, so I decided that the data did need to be sorted in descending order.</description>
      <pubDate>Mon, 04 Jan 2010 18:47:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Maximum-date-in-a-SAS-dataset/m-p/36558#M9204</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-01-04T18:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum date in a SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Maximum-date-in-a-SAS-dataset/m-p/36559#M9205</link>
      <description>Suggest using a SAS view - no need to sort the data, regardless.  Just keep track of the MAX value encountered.  Okay, so sorting the data does permit you to select the first obs from the sorted-output file.  I'd submit that there will be less resource usage if you use a SAS view, pass the file as-is, where-is.  However, it's still unclear what you intend to do with the max-value -- as was previously asked.&lt;BR /&gt;
&lt;BR /&gt;
Good luck.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 04 Jan 2010 18:54:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Maximum-date-in-a-SAS-dataset/m-p/36559#M9205</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-01-04T18:54:58Z</dc:date>
    </item>
  </channel>
</rss>

