<?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: What is wrong with my data step? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/What-is-wrong-with-my-data-step/m-p/28922#M4439</link>
    <description>Try this - and also do the suggested reading:&lt;BR /&gt;
&lt;BR /&gt;
data Uniquepolicy;&lt;BR /&gt;
  set Sortedpolicy;&lt;BR /&gt;
  By POLICY_SK;&lt;BR /&gt;
  rename TRAN_SEQ_NUM=MAX_TRAN_SEQ_NUM;&lt;BR /&gt;
  /* output last row per distinct POLICY_SK      */&lt;BR /&gt;
  if last.POLICY_SK then output; &lt;BR /&gt;
run;

Message was edited by: Patrick</description>
    <pubDate>Sat, 12 Dec 2009 00:45:06 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2009-12-12T00:45:06Z</dc:date>
    <item>
      <title>What is wrong with my data step?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/What-is-wrong-with-my-data-step/m-p/28920#M4437</link>
      <description>This is some basic question.&lt;BR /&gt;
My code...&lt;BR /&gt;
data Uniquepolicy;&lt;BR /&gt;
set Sortedpolicy;&lt;BR /&gt;
By POLICY_SK;&lt;BR /&gt;
MAX_TRAN_SEQ_NUM= last.TRAN_SEQ_NUM;&lt;BR /&gt;
run; &lt;BR /&gt;
Sortedpolicy has variables POLICY_SK and TRAN_SEQ_NUM.It was sorted by POLICY_SK and then by TRAN_SEQ_NUM.I wanted all Policy_SK with largest TRAN_SEQ_NUM. I am getting same number of obs. in the new table Uniquepolicy. Please help.</description>
      <pubDate>Thu, 10 Dec 2009 23:41:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/What-is-wrong-with-my-data-step/m-p/28920#M4437</guid>
      <dc:creator>SP2</dc:creator>
      <dc:date>2009-12-10T23:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with my data step?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/What-is-wrong-with-my-data-step/m-p/28921#M4438</link>
      <description>You will likely see in your SAS log a message about VARIABLE last.TRAN_SEQ_NUM IS UNINITIALIZED.  Your BY statement does not specify this variable and so it is not being initialized by SAS as you might be expecting.&lt;BR /&gt;
&lt;BR /&gt;
Suggested reading:&lt;BR /&gt;
&lt;BR /&gt;
SAS Language Reference: Concepts, Definitions for BY-Group Processing:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a001330158.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a001330158.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 11 Dec 2009 01:12:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/What-is-wrong-with-my-data-step/m-p/28921#M4438</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-11T01:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with my data step?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/What-is-wrong-with-my-data-step/m-p/28922#M4439</link>
      <description>Try this - and also do the suggested reading:&lt;BR /&gt;
&lt;BR /&gt;
data Uniquepolicy;&lt;BR /&gt;
  set Sortedpolicy;&lt;BR /&gt;
  By POLICY_SK;&lt;BR /&gt;
  rename TRAN_SEQ_NUM=MAX_TRAN_SEQ_NUM;&lt;BR /&gt;
  /* output last row per distinct POLICY_SK      */&lt;BR /&gt;
  if last.POLICY_SK then output; &lt;BR /&gt;
run;

Message was edited by: Patrick</description>
      <pubDate>Sat, 12 Dec 2009 00:45:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/What-is-wrong-with-my-data-step/m-p/28922#M4439</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2009-12-12T00:45:06Z</dc:date>
    </item>
  </channel>
</rss>

