<?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 Character varaiables in Proc Report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sorting-Character-varaiables-in-Proc-Report/m-p/349676#M273579</link>
    <description>Thanks Reeza..&lt;BR /&gt;&lt;BR /&gt;Its worked by using ANYDTDTE format..&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 13 Apr 2017 05:36:29 GMT</pubDate>
    <dc:creator>Harish2</dc:creator>
    <dc:date>2017-04-13T05:36:29Z</dc:date>
    <item>
      <title>Sorting Character varaiables in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-Character-varaiables-in-Proc-Report/m-p/349660#M273574</link>
      <description>&lt;P&gt;We are generating&amp;nbsp;yearly&amp;nbsp;report for the client and having&amp;nbsp;financial year from July to June...&amp;nbsp;I have the Output result below.But&amp;nbsp;I need that to be order by July 2016 to June 2017 by proc report only.Please find the below code and also output.Please help me resolve this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Month&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Apr-17&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Aug-16&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Jan-17&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Jun-17&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;May-17&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Nov-16&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Oct-16&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Sep-16&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Jul-16&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Dec-16&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Feb-17&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Mar-17&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find the code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;TITLE1 &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Provider Closed Case Review"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;TITLE2 &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Average Number of Days Open per Month"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;TITLE3 &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"For State Fiscal Year &amp;amp;FY."&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;options missing=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;proc report data= days_opened_final ;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;columns case_opened_month NO_CLOSED_CASES AVR_DYAS (&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'_Type of Cases_'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; COMP ALR DRA ACC REC EXC DEATH PROVI PRE ); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;define case_opened_month / order descending order=formatted;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;define case_opened_month / group &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Month"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;define case_opened_month1 /computed noprint;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;define no_of_cases_closed/analysis sum &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"No of Cases Closed"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;define AVR_DYAS /mean &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Average days opened"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;define COMP/analysis sum &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Provider Comprehensive SURS Review"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;define ALR/analysis sum &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Algorithm Limited Review"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;define DRA/analysis sum &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"DRA Attestation"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;define ACC/analysis sum &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"MCO Review Outcome Accuracy"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;define REC/analysis sum &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"State-Directed Recovery"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;define EXC/analysis sum &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Excluded Entity"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;define DEATH/analysis sum &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Beneficiary Death"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;define PROVI/analysis sum &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Provider Death"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;define PRE/analysis sum &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Prepayment Review"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;compute case_opened_month;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;IF _break_=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'_RBREAK_'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; THEN CALL DEFINE(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'case_opened_month'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'style'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'style=[pretext="Total"]'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;endcomp;&lt;/P&gt;&lt;P&gt;rbreak after/summarize ol ul ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2017 04:20:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-Character-varaiables-in-Proc-Report/m-p/349660#M273574</guid>
      <dc:creator>Harish2</dc:creator>
      <dc:date>2017-04-13T04:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Character varaiables in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-Character-varaiables-in-Proc-Report/m-p/349662#M273575</link>
      <description>&lt;P&gt;Don't store dates as a character variable. Of course it's going to sort alphabetically which is correct because that's how you've specified it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a numeric variable with a date format and use that variable to order your data. Because of the variable conversion it needs to be done prior to the PROC REPORT. I don't think there's a way to fix it directly in the PROC.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2017 04:25:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-Character-varaiables-in-Proc-Report/m-p/349662#M273575</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-13T04:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Character varaiables in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-Character-varaiables-in-Proc-Report/m-p/349664#M273576</link>
      <description>&lt;P&gt;Thanks Reeza for the qucik response..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since the month varaible is in monyy7. format and i have tried by using Input function for changing the charatcer to numeric varaible but it is not giving desired result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me to give the solution /code for this to change.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Harish&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2017 04:35:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-Character-varaiables-in-Proc-Report/m-p/349664#M273576</guid>
      <dc:creator>Harish2</dc:creator>
      <dc:date>2017-04-13T04:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Character varaiables in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-Character-varaiables-in-Proc-Report/m-p/349670#M273577</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/106917"&gt;@Harish2&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thanks Reeza for the qucik response..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since the month varaible is in monyy7. format and i have tried by using Input function for changing the charatcer to numeric varaible but it is not giving desired result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help me to give the solution /code for this to change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Harish&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This isn't informative. Why/How did INPUT() not work?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post the code you've tried and indicate where you're having issues.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Monyy7 doesn't expect a dash AFAIK so either remove the dash using the COMPRESS() function or try ANYDTDTE format.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2017 05:07:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-Character-varaiables-in-Proc-Report/m-p/349670#M273577</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-13T05:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Character varaiables in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-Character-varaiables-in-Proc-Report/m-p/349675#M273578</link>
      <description>Hi Reeza,&lt;BR /&gt;&lt;BR /&gt;Here is the code I am using to convert the format&lt;BR /&gt;&lt;BR /&gt;data order;&lt;BR /&gt;set days_opened_final;&lt;BR /&gt;date_new = input(substr(case_opened_month, 1, 3) ||&lt;BR /&gt;substr(case_opened_month,4, 4), monyy7.);&lt;BR /&gt;run;</description>
      <pubDate>Thu, 13 Apr 2017 05:30:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-Character-varaiables-in-Proc-Report/m-p/349675#M273578</guid>
      <dc:creator>Harish2</dc:creator>
      <dc:date>2017-04-13T05:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Character varaiables in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-Character-varaiables-in-Proc-Report/m-p/349676#M273579</link>
      <description>Thanks Reeza..&lt;BR /&gt;&lt;BR /&gt;Its worked by using ANYDTDTE format..&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Apr 2017 05:36:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-Character-varaiables-in-Proc-Report/m-p/349676#M273579</guid>
      <dc:creator>Harish2</dc:creator>
      <dc:date>2017-04-13T05:36:29Z</dc:date>
    </item>
  </channel>
</rss>

