<?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: How to Output Unsorted data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Output-Unsorted-data/m-p/176450#M33802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;not sure but i think this will work .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data&amp;nbsp; t2;&lt;/P&gt;&lt;P&gt;input subjid rowno tmpoint &amp;amp; $25.;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;101 1 4 hr&lt;/P&gt;&lt;P&gt;101 2 8 hr&lt;/P&gt;&lt;P&gt;101 3 12 hr&lt;/P&gt;&lt;P&gt;101 4 16 hr&lt;/P&gt;&lt;P&gt;102 1 4 hr&lt;/P&gt;&lt;P&gt;102 3 12 hr&lt;/P&gt;&lt;P&gt;102 4 16 hr&lt;/P&gt;&lt;P&gt;102 2 8 hr&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;&lt;/P&gt;&lt;P&gt;data t2_1;&lt;/P&gt;&lt;P&gt;set t2;&lt;/P&gt;&lt;P&gt;by subjid;&lt;/P&gt;&lt;P&gt;retain cnt&amp;nbsp; 0;&lt;/P&gt;&lt;P&gt;if first.subjid then cnt = 0;&lt;/P&gt;&lt;P&gt;cnt+1;&lt;/P&gt;&lt;P&gt;if cnt ~= rowno then output&amp;nbsp; t2_1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Feb 2014 12:36:24 GMT</pubDate>
    <dc:creator>TarunKumar</dc:creator>
    <dc:date>2014-02-17T12:36:24Z</dc:date>
    <item>
      <title>How to Output Unsorted data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Output-Unsorted-data/m-p/176447#M33799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have Following data In which I want to output not sorted data in another dataset. How??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data&amp;nbsp; t2;&lt;/P&gt;&lt;P&gt; input subjid rowno tmpoint &amp;amp; $25.;&lt;/P&gt;&lt;P&gt; datalines;&lt;/P&gt;&lt;P&gt;101 1 4 hr&lt;/P&gt;&lt;P&gt;101 2 8 hr&lt;/P&gt;&lt;P&gt;101 3 12 hr&lt;/P&gt;&lt;P&gt;101 4 16 hr&lt;/P&gt;&lt;P&gt;102 1 4 hr&lt;/P&gt;&lt;P&gt;102 2 12 hr&lt;/P&gt;&lt;P&gt;102 3 16 hr&lt;/P&gt;&lt;P&gt;102 4 8 hr&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help will help me a lot.Thanks In Advance..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Feb 2014 06:28:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Output-Unsorted-data/m-p/176447#M33799</guid>
      <dc:creator>dishant</dc:creator>
      <dc:date>2014-02-17T06:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to Output Unsorted data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Output-Unsorted-data/m-p/176448#M33800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;don't understand what do you want to do. Please eleobrate the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Feb 2014 07:32:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Output-Unsorted-data/m-p/176448#M33800</guid>
      <dc:creator>TarunKumar</dc:creator>
      <dc:date>2014-02-17T07:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to Output Unsorted data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Output-Unsorted-data/m-p/176449#M33801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;Hi&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Have data like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.333333969116211px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data&amp;nbsp; t2;&lt;/P&gt;&lt;P style="font-size: 13.333333969116211px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;input subjid rowno tmpoint &amp;amp; $25.;&lt;/P&gt;&lt;P style="font-size: 13.333333969116211px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;datalines;&lt;/P&gt;&lt;P style="font-size: 13.333333969116211px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;101 1 4 hr&lt;/P&gt;&lt;P style="font-size: 13.333333969116211px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;101 2 8 hr&lt;/P&gt;&lt;P style="font-size: 13.333333969116211px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;101 3 12 hr&lt;/P&gt;&lt;P style="font-size: 13.333333969116211px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;101 4 16 hr&lt;/P&gt;&lt;P style="font-size: 13.333333969116211px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;102 1 4 hr&lt;/P&gt;&lt;P style="font-size: 13.333333969116211px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;102 3 12 hr&lt;/P&gt;&lt;P style="font-size: 13.333333969116211px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;102 4 16 hr&lt;/P&gt;&lt;P style="font-size: 13.333333969116211px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;102 2 8 hr&lt;/P&gt;&lt;P style="font-size: 13.333333969116211px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-size: 13.333333969116211px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.333333969116211px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Now In Upper data I want output those observations which are not sorted.How?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Feb 2014 08:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Output-Unsorted-data/m-p/176449#M33801</guid>
      <dc:creator>dishant</dc:creator>
      <dc:date>2014-02-17T08:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to Output Unsorted data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Output-Unsorted-data/m-p/176450#M33802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;not sure but i think this will work .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data&amp;nbsp; t2;&lt;/P&gt;&lt;P&gt;input subjid rowno tmpoint &amp;amp; $25.;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;101 1 4 hr&lt;/P&gt;&lt;P&gt;101 2 8 hr&lt;/P&gt;&lt;P&gt;101 3 12 hr&lt;/P&gt;&lt;P&gt;101 4 16 hr&lt;/P&gt;&lt;P&gt;102 1 4 hr&lt;/P&gt;&lt;P&gt;102 3 12 hr&lt;/P&gt;&lt;P&gt;102 4 16 hr&lt;/P&gt;&lt;P&gt;102 2 8 hr&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;&lt;/P&gt;&lt;P&gt;data t2_1;&lt;/P&gt;&lt;P&gt;set t2;&lt;/P&gt;&lt;P&gt;by subjid;&lt;/P&gt;&lt;P&gt;retain cnt&amp;nbsp; 0;&lt;/P&gt;&lt;P&gt;if first.subjid then cnt = 0;&lt;/P&gt;&lt;P&gt;cnt+1;&lt;/P&gt;&lt;P&gt;if cnt ~= rowno then output&amp;nbsp; t2_1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Feb 2014 12:36:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Output-Unsorted-data/m-p/176450#M33802</guid>
      <dc:creator>TarunKumar</dc:creator>
      <dc:date>2014-02-17T12:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to Output Unsorted data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Output-Unsorted-data/m-p/176451#M33803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tarunkumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Appreciate For your help and time. This Takes me a new level of Thinking .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 04:32:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Output-Unsorted-data/m-p/176451#M33803</guid>
      <dc:creator>dishant</dc:creator>
      <dc:date>2014-02-18T04:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to Output Unsorted data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Output-Unsorted-data/m-p/176452#M33804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another thought:&lt;/P&gt;&lt;P&gt;Where order is defined by a numeric var, use the DIF() function like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data ordered unordered ;&lt;/P&gt;&lt;P&gt;Set your.data ;&lt;/P&gt;&lt;P&gt;by subjID ;&lt;/P&gt;&lt;P&gt;drop difff ;&lt;/P&gt;&lt;P&gt;Difff = dif( rowno ) ;&lt;/P&gt;&lt;P&gt;if first.subjid then output ordered ;&lt;/P&gt;&lt;P&gt;Else&amp;nbsp; if difff GE 0 then output ordered ;&lt;/P&gt;&lt;P&gt;else output unordered ;&lt;/P&gt;&lt;P&gt;Run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &#xD;
Message was edited by: Peter Crawford&#xD;
 To fix typos after submitting&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 16:42:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Output-Unsorted-data/m-p/176452#M33804</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-03-14T16:42:14Z</dc:date>
    </item>
  </channel>
</rss>

