<?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 how to sort data without using proc step  and first.var and last.var? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-sort-data-without-using-proc-step-and-first-var-and-last/m-p/336122#M76170</link>
    <description>&lt;P&gt;I've dataset name called sales&lt;/P&gt;&lt;P&gt;I want sort data without using proc and first.var and last.var;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data tab;&lt;/P&gt;&lt;P&gt;input country;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you please help me out....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Feb 2017 09:19:21 GMT</pubDate>
    <dc:creator>praveenkotte</dc:creator>
    <dc:date>2017-02-27T09:19:21Z</dc:date>
    <item>
      <title>how to sort data without using proc step  and first.var and last.var?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-sort-data-without-using-proc-step-and-first-var-and-last/m-p/336122#M76170</link>
      <description>&lt;P&gt;I've dataset name called sales&lt;/P&gt;&lt;P&gt;I want sort data without using proc and first.var and last.var;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data tab;&lt;/P&gt;&lt;P&gt;input country;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you please help me out....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 09:19:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-sort-data-without-using-proc-step-and-first-var-and-last/m-p/336122#M76170</guid>
      <dc:creator>praveenkotte</dc:creator>
      <dc:date>2017-02-27T09:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to sort data without using proc step  and first.var and last.var?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-sort-data-without-using-proc-step-and-first-var-and-last/m-p/336129#M76172</link>
      <description>&lt;P&gt;What is the reason for not using proc sort?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 09:35:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-sort-data-without-using-proc-step-and-first-var-and-last/m-p/336129#M76172</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-27T09:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to sort data without using proc step  and first.var and last.var?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-sort-data-without-using-proc-step-and-first-var-and-last/m-p/336131#M76173</link>
      <description>&lt;P&gt;it was one of the interview question that i was asked for..&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 09:39:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-sort-data-without-using-proc-step-and-first-var-and-last/m-p/336131#M76173</guid>
      <dc:creator>praveenkotte</dc:creator>
      <dc:date>2017-02-27T09:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to sort data without using proc step  and first.var and last.var?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-sort-data-without-using-proc-step-and-first-var-and-last/m-p/336133#M76175</link>
      <description>&lt;P&gt;"&lt;/P&gt;
&lt;P&gt;I want sort data without using proc and first.var and last.var;" - How will first/last help you sort anything?&lt;/P&gt;
&lt;P&gt;Use one of the methods developed by experts over years = proc sort, order by. &amp;nbsp;These are both efficient and simple, and all SAS programmers will be abel to understand your code easily. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, get yourself and x86 assembler and write all your code using machine code.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 09:40:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-sort-data-without-using-proc-step-and-first-var-and-last/m-p/336133#M76175</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-02-27T09:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to sort data without using proc step  and first.var and last.var?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-sort-data-without-using-proc-step-and-first-var-and-last/m-p/336136#M76178</link>
      <description>&lt;P&gt;You can produce sorted data with a &lt;A href="https://support.sas.com/documentation/cdl/en/lrcon/69852/HTML/default/viewer.htm#n1b4cbtmb049xtn1vh9x4waiioz4.htm" target="_blank"&gt;hash object&lt;/A&gt; (probably the answer the interviewer wanted).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 09:46:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-sort-data-without-using-proc-step-and-first-var-and-last/m-p/336136#M76178</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-27T09:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to sort data without using proc step  and first.var and last.var?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-sort-data-without-using-proc-step-and-first-var-and-last/m-p/336146#M76181</link>
      <description>&lt;P&gt;Maybe they just want a computer science guy who know data structure. not a sas or statististic guy.&lt;/P&gt;
&lt;P&gt;This kind of question should be given to software developer . not data analysis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tab;
input country;
cards;
1
3
2
5
6
1
5
4
;
run;

data want;
 set tab end=last;
 array x{99999} _temporary_;
 x{_n_}=country;
 if last then do;
  do i=1 to _n_;
   do j=i+1 to _n_;
    if x{i} gt x{j} then do;
     temp=x{i};x{i}=x{j};x{j}=temp;
    end;
   end;
  end;
  
  do k=1 to _n_;
   country=x{k};output;
  end;
 end;
 keep country;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Feb 2017 10:28:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-sort-data-without-using-proc-step-and-first-var-and-last/m-p/336146#M76181</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-02-27T10:28:54Z</dc:date>
    </item>
  </channel>
</rss>

