<?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: Why the order of the output is coming somewhat wrongly in Proc report? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Why-the-order-of-the-output-is-coming-somewhat-wrongly-in-Proc/m-p/115412#M31905</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to tell it to sort by the actual value and not the displayed text string's value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define sales / order order=internal ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Nov 2012 12:34:49 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2012-11-02T12:34:49Z</dc:date>
    <item>
      <title>Why the order of the output is coming somewhat wrongly in Proc report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Why-the-order-of-the-output-is-coming-somewhat-wrongly-in-Proc/m-p/115409#M31902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can any one help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data one;&lt;/P&gt;&lt;P&gt;INPUT ZIP CTY $ VAR :$15. SALES;&lt;/P&gt;&lt;P&gt;CARDS;&lt;/P&gt;&lt;P&gt;52423 Scott Merlot 186.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;52423 Scott Chardonnay 156.61&lt;/P&gt;&lt;P&gt;52423 Scott Zinfandel 35.5&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;52423 Scott Merlot 55.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;52388 Scott Merlot 122.89&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;52388 Scott Chardonnay 78.22 &lt;/P&gt;&lt;P&gt;52388 Scott Zinfandel 15.4&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;52200 Adams Merlot 385.51&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;52200 Adams Chardonnay 246&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;52200 Adams Zinfandel 151.1&amp;nbsp; &lt;/P&gt;&lt;P&gt;52200 Adams Chardonnay 76.24 &lt;/P&gt;&lt;P&gt;52199 Adams Merlot 233.03&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;52199 Adams Chardonnay 185.22&lt;/P&gt;&lt;P&gt;52199 Adams Zinfandel 95.84&amp;nbsp; &lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;proc report data=one nofs headline headskip;&lt;/P&gt;&lt;P&gt;column cty zip var sales;&lt;/P&gt;&lt;P&gt;define var / display;&lt;/P&gt;&lt;P&gt;define sales / order;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 09:08:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Why-the-order-of-the-output-is-coming-somewhat-wrongly-in-Proc/m-p/115409#M31902</guid>
      <dc:creator>devarayalu</dc:creator>
      <dc:date>2012-11-02T09:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why the order of the output is coming somewhat wrongly in Proc report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Why-the-order-of-the-output-is-coming-somewhat-wrongly-in-Proc/m-p/115410#M31903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Give the informat for sales also like 6.2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 09:53:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Why-the-order-of-the-output-is-coming-somewhat-wrongly-in-Proc/m-p/115410#M31903</guid>
      <dc:creator>antony_allianz</dc:creator>
      <dc:date>2012-11-02T09:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Why the order of the output is coming somewhat wrongly in Proc report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Why-the-order-of-the-output-is-coming-somewhat-wrongly-in-Proc/m-p/115411#M31904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;give informat to sales as sales:6.2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 09:56:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Why-the-order-of-the-output-is-coming-somewhat-wrongly-in-Proc/m-p/115411#M31904</guid>
      <dc:creator>antony_allianz</dc:creator>
      <dc:date>2012-11-02T09:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why the order of the output is coming somewhat wrongly in Proc report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Why-the-order-of-the-output-is-coming-somewhat-wrongly-in-Proc/m-p/115412#M31905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to tell it to sort by the actual value and not the displayed text string's value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define sales / order order=internal ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 12:34:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Why-the-order-of-the-output-is-coming-somewhat-wrongly-in-Proc/m-p/115412#M31905</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-11-02T12:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Why the order of the output is coming somewhat wrongly in Proc report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Why-the-order-of-the-output-is-coming-somewhat-wrongly-in-Proc/m-p/115413#M31906</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; In addition to Tom's suggestion, depending on what you mean by the "order coming out somewhat wrongly", there are other options you can use in your DEFINE statement. For example, if you want the SALES in DESCENDING order, that is an option you can list on the DEFINE statement. ORDER= can take 4 values: FREQ, FORMATTED, INTERNAL and DATA.&amp;nbsp; I rarely use FREQ or FORMATTED. I find that either INTERNAL or DATA suits most of what I need to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Here are some other examples to compare.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;Data one;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;INPUT ZIP CTY $ VAR :$15. SALES;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;CARDS;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;52423 Scott Merlot 186.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;52423 Scott Chardonnay 156.61&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;52423 Scott Zinfandel 35.5&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;52423 Scott Merlot 55.3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;52388 Scott Merlot 122.89&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;52388 Scott Chardonnay 78.22&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;52388 Scott Zinfandel 15.4&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;52200 Adams Merlot 385.51&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;52200 Adams Chardonnay 246&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;52200 Adams Zinfandel 151.1 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;52200 Adams Chardonnay 76.24&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;52199 Adams Merlot 233.03&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;52199 Adams Chardonnay 185.22&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;52199 Adams Zinfandel 95.84 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\show_order.html' style=sasweb;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=one nofs;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title '1) ORDER (simple) is ASCENDING';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;column cty zip var sales;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define var / display;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define sales / order f=6.2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=one nofs;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title '2) ORDER (simple) is DESCENDING';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;column cty zip var sales;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define var / display;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define sales / order descending f=6.2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&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;proc report data=one nofs;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title '3) ORDER is DATA gives input data order';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;column cty zip var sales;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define var / display;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define sales / order f=6.2 order=data;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=one nofs;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title '4) ORDER is internal';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;column cty zip var sales;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define var / display;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define sales / order f=6.2 order=internal;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=one nofs;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title '5) ORDER for multiple vars note that ZIP is still unordered';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;column cty zip var sales;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define cty / order;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define var / display;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define sales / order f=6.2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=one nofs;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title '6) ORDER for multiple vars DESCENDING for CTY';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;column cty zip var sales;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define cty / order DESCENDING;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define var / display;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define sales / order f=6.2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html close;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 13:01:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Why-the-order-of-the-output-is-coming-somewhat-wrongly-in-Proc/m-p/115413#M31906</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-11-02T13:01:49Z</dc:date>
    </item>
  </channel>
</rss>

