<?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: individual report output in descending order. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/individual-report-output-in-descending-order/m-p/78732#M22680</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cynthia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is exactly what I wanted. I wanted the policy_id&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; with the highest number of rows to be first.. 102 then 100 and then 101.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any other method to do the same thing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jan 2013 06:42:27 GMT</pubDate>
    <dc:creator>savvy_sas_user</dc:creator>
    <dc:date>2013-01-18T06:42:27Z</dc:date>
    <item>
      <title>individual report output in descending order.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/individual-report-output-in-descending-order/m-p/78730#M22678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;The question is you have unique policy ID# and each PolicyID# can have more than 1 vehicleID. So I want an individual report of policy# with the highest # of vehicleIDs. So in this case the policyID 102 had highest vehicleIDs and I want it to be displayed on the top of the report so in descending ORDER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know proc report is one way, can you please tell me any other method to get the same output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is code that I used to figure using proc report, everything works but it doesn't create the output in descending. Please HELP...I need the answer soon...Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data insurance;&lt;/P&gt;&lt;P&gt;input policy_id$ vehicle_id$ ;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;100 ABC&lt;/P&gt;&lt;P&gt;100 XYZ&lt;/P&gt;&lt;P&gt;100 JLI&lt;/P&gt;&lt;P&gt;101 EFG&lt;/P&gt;&lt;P&gt;102 HIJ&lt;/P&gt;&lt;P&gt;102 KLM&lt;/P&gt;&lt;P&gt;102 NOP&lt;/P&gt;&lt;P&gt;102 QRS&lt;/P&gt;&lt;P&gt;102 TUV&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;Proc Report Data=insurance nowd;&lt;/P&gt;&lt;P&gt;by policy_id;&lt;/P&gt;&lt;P&gt;column policy_id vehicle_id;&lt;/P&gt;&lt;P&gt;Define policy_id / group;&lt;/P&gt;&lt;P&gt;Define vehicle_id / order order=freq;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2013 00:59:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/individual-report-output-in-descending-order/m-p/78730#M22678</guid>
      <dc:creator>savvy_sas_user</dc:creator>
      <dc:date>2013-01-18T00:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: individual report output in descending order.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/individual-report-output-in-descending-order/m-p/78731#M22679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I guess I'm confused. The vehicle_ids are unique. Each one has a freq of 1, so I'm not sure that ORDER=FREQ is going to do anything for you. When you envision the results, do you say you want to see policy_id of 102, followed by 100, followed by 101???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Also, why do you have BY POLICY_ID? Using a BY statement will force Policy_ID 100, 101, 102 as the order -- no matter what you have in PROC REPORT. I think you need to take off the BY statement completely. There are other ways to get a new page for every POLICY_ID, such as using a BREAK AFTER POLICY_ID/PAGE; statement in PROC REPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Then, if you want the POLICY_ID with the highest number of rows to be first, then you should consider:&lt;/P&gt;&lt;P&gt;&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; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;Define policy_id / group order=freq descending;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;Define vehicle_id / order;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;cynthia&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2013 02:53:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/individual-report-output-in-descending-order/m-p/78731#M22679</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-01-18T02:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: individual report output in descending order.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/individual-report-output-in-descending-order/m-p/78732#M22680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cynthia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is exactly what I wanted. I wanted the policy_id&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; with the highest number of rows to be first.. 102 then 100 and then 101.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any other method to do the same thing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2013 06:42:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/individual-report-output-in-descending-order/m-p/78732#M22680</guid>
      <dc:creator>savvy_sas_user</dc:creator>
      <dc:date>2013-01-18T06:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: individual report output in descending order.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/individual-report-output-in-descending-order/m-p/78733#M22681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I really don't understand what you want/mean. Your original posted code was never going to give you what you say you wanted. Did you try the code I posted, with ORDER=FREQ moved to the DEFINE statement for POLICY_ID? You will have to take the BY statement out of the code, too. I suppose there are other ways that I could envision doing what you describe, but they are not as straightforward as using PROC REPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2013 07:02:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/individual-report-output-in-descending-order/m-p/78733#M22681</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-01-18T07:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: individual report output in descending order.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/individual-report-output-in-descending-order/m-p/78734#M22682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, i tried the code you posted and it worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2013 07:34:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/individual-report-output-in-descending-order/m-p/78734#M22682</guid>
      <dc:creator>savvy_sas_user</dc:creator>
      <dc:date>2013-01-18T07:34:59Z</dc:date>
    </item>
  </channel>
</rss>

