<?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: Sort Data without Proc sort or order by in proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331147#M74379</link>
    <description>&lt;P&gt;How are you planning on transposing the data without using a procedure? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I take it that you are allowed to use IML since you mention call sort?&lt;/P&gt;</description>
    <pubDate>Thu, 09 Feb 2017 13:45:39 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2017-02-09T13:45:39Z</dc:date>
    <item>
      <title>Sort Data without Proc sort or order by in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331146#M74378</link>
      <description>&lt;P&gt;Hi Experts,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a question&amp;nbsp;in my mind from few days and working on it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suppose say I have an data set a which has a variable id and its not sorted.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
input id;
cards;
1
2
4
5
3
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I want this dataset to be sorted without using any proc or order by statement. I am thinking to transpose this data and then use call sort and then again transpose. Need your suggestions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Arun&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 13:40:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331146#M74378</guid>
      <dc:creator>Arun_shSAS</dc:creator>
      <dc:date>2017-02-09T13:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Data without Proc sort or order by in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331147#M74379</link>
      <description>&lt;P&gt;How are you planning on transposing the data without using a procedure? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I take it that you are allowed to use IML since you mention call sort?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 13:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331147#M74379</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-02-09T13:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Data without Proc sort or order by in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331150#M74380</link>
      <description>&lt;P&gt;Why? &amp;nbsp;Proc sort, and order by are specifically built into SAS and SQL respectively for the sole purpose of ordering data. &amp;nbsp;What purpose does it serve doing this yourself, you will write code that will be messy, and far slower than the built in functions - plus to get an accurate procedure, you will need to validate it etc.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 13:54:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331150#M74380</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-02-09T13:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Data without Proc sort or order by in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331155#M74382</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply. But sometimes these types fancy questions can be asked in candidature reviewing.&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Feb 2017 14:06:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331155#M74382</guid>
      <dc:creator>Arun_shSAS</dc:creator>
      <dc:date>2017-02-09T14:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Data without Proc sort or order by in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331161#M74385</link>
      <description>&lt;P&gt;If it was me in the chair I would say what I have stated above. &amp;nbsp;If the interviewier is asking daft stuff like this, then I would considering how to get out of there as fast as possible. &amp;nbsp;I mean where you going to go, maybe altering memory locations, heck go back to soldering transistors onto a board to order your data.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 14:21:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331161#M74385</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-02-09T14:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Data without Proc sort or order by in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331162#M74386</link>
      <description>lol&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Feb 2017 14:23:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331162#M74386</guid>
      <dc:creator>Arun_shSAS</dc:creator>
      <dc:date>2017-02-09T14:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Data without Proc sort or order by in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331168#M74388</link>
      <description>&lt;P&gt;Well, if you can't use PROC SORT, it doesn't seem fair that you can use CALL SORTN.&amp;nbsp; So let's remove that tool as well.&amp;nbsp; Purely as a theoretical exercise of ocurse.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, find out the number of IDs that you have:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;/P&gt;
&lt;P&gt;set have nobs=_nobs_;&lt;/P&gt;
&lt;P&gt;call symputx('n_ids', _nobs_);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then use a DATA step to transpose, sort (without any CALL routines), and output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;array ids {&amp;amp;n_ids} &lt;U&gt;&lt;/U&gt;id1-id&amp;amp;n_ids;&lt;/P&gt;
&lt;P&gt;do i=1 by 1 until (done);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set have end=done;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; ids{i} = id;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That much loads the IDs into an array.&amp;nbsp; Next, the same DATA step continues to sort them with no CALL routines:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do until (changes=0);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; changes=0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; do i=2 to &amp;amp;n_ids;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ids{i} &amp;lt; ids{i-1} then do;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Two IDs are not in order.&amp;nbsp; Switch them;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; changes + 1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp = ids{i-1};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ids{i-1} = ids{i};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ids{i}=temp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, DO UNTIL is dangerous and if incorrectly used can result in an infinite loop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When all the switching is complete, output the results in the same DATA step:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do i=1 to &amp;amp;n_ids;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;id = ids{i};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;keep id;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Most anything can be done.&amp;nbsp; But as others have asked, would you really want to?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 14:33:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331168#M74388</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-02-09T14:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Data without Proc sort or order by in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331205#M74406</link>
      <description>&lt;P&gt;Open a table in tableview with openmode=edit and sort there by clicking on column heading and the sort icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Write the data out to a different file format and use someone else's sort utility.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I could write a very inefficient program comparing two rows of data with lag or dif,retain and a bunch of arrays to swap/write values. Really would not want to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would really be tempted to ask an interviewer why they want to use a crowbar instead of a screwdriver when the task calls for a screwdriver.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 15:57:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331205#M74406</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-02-09T15:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Data without Proc sort or order by in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331247#M74420</link>
      <description>&lt;P&gt;Option 1:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Hash object with "ordered:" parameter:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Sasfont"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Sasfont"&gt;_null_&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Sasfont"&gt;&amp;nbsp; if&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Sasfont"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Sasfont"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Sasfont"&gt;set&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt; have;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Sasfont"&gt;&amp;nbsp; declare&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Sasfont"&gt;hash&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt; h (dataset:&lt;/FONT&gt;&lt;FONT color="#800080" face="Sasfont"&gt;'have'&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt;,ordered:&lt;/FONT&gt;&lt;FONT color="#800080" face="Sasfont"&gt;'a'&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Sasfont"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.definekey(&lt;/FONT&gt;&lt;FONT color="#800080" face="Sasfont"&gt;'id'&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Sasfont"&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.definedata(all:&lt;/FONT&gt;&lt;FONT color="#800080" face="Sasfont"&gt;'Y'&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Sasfont"&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.definedone();&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Sasfont"&gt;&amp;nbsp;&amp;nbsp;rc=h.output(dataset:&lt;/FONT&gt;&lt;FONT color="#800080" face="Sasfont"&gt;'want'&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Sasfont"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Option 2:&amp;nbsp;You can even drop the ordered parameter if you use the hashexp:0 parameter:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Sasfont"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Sasfont"&gt;_null_&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Sasfont"&gt;&amp;nbsp; if&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Sasfont"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Sasfont"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Sasfont"&gt;set&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt; have;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Sasfont"&gt;&amp;nbsp; declare&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Sasfont"&gt;hash&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt; h (dataset:&lt;/FONT&gt;&lt;FONT color="#800080" face="Sasfont"&gt;'have'&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt;,hashexp:&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Sasfont"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Sasfont"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Sasfont"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.definekey(&lt;/FONT&gt;&lt;FONT color="#800080" face="Sasfont"&gt;'id'&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Sasfont"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.definedata(all:&lt;/FONT&gt;&lt;FONT color="#800080" face="Sasfont"&gt;'Y'&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.definedone();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Sasfont"&gt;&amp;nbsp;&amp;nbsp;rc=h.output(dataset:&lt;/FONT&gt;&lt;FONT color="#800080" face="Sasfont"&gt;'want2'&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Sasfont"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Sasfont"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The hashexp:0 parameter tells sas to use only a single "bucket" for the hash object. (2**0=1 bucket.&amp;nbsp; The default is hashexp:8 implying 2**8=256&amp;nbsp;buckets).&amp;nbsp; And each bucket, we have been told by Paul Dorfman in a number of presentations on the SAS hash object, is an AVL tree.&amp;nbsp; It turns out this AVL tree, when processed through the OUTPUT method generates a sorted dataset when only one bucket is used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have duplicate id's, then include the "multidata:'Y'" parameter in the declare hash statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why one would go out of their way to do this, I don't know.&amp;nbsp; Perhaps, because hash objects are memory-resident, there might be less disk input/output in re-ordering data items.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 17:19:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331247#M74420</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-02-09T17:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Data without Proc sort or order by in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331334#M74444</link>
      <description>&lt;P&gt;"If you're looking for an idiot who wastes your customer's money by wasting time doing stupid things, then I'm not the right person for you. I'm intelligent and like working hard at work worth doing."&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 21:28:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/331334#M74444</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-09T21:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Data without Proc sort or order by in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/334097#M75407</link>
      <description>&lt;P&gt;A very easy method is sort a dataset with proc sort or orderby&amp;nbsp;satetment is indexing.&lt;/P&gt;&lt;P&gt;As we know the index in stored as sorted with manner along with the dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
input x;
cards;
1
3
4
2
5
;
run;

proc datasets lib=work  noprint;
modify a;
index create x;
run;

data b;
set a;
by x;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 Feb 2017 16:34:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/334097#M75407</guid>
      <dc:creator>Arun_shSAS</dc:creator>
      <dc:date>2017-02-18T16:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Data without Proc sort or order by in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/334115#M75421</link>
      <description>&lt;P&gt;hi do you have a pdf notes on this .. it will be great for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;</description>
      <pubDate>Sat, 18 Feb 2017 18:45:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sort-Data-without-Proc-sort-or-order-by-in-proc-sql/m-p/334115#M75421</guid>
      <dc:creator>Arun_shSAS</dc:creator>
      <dc:date>2017-02-18T18:45:23Z</dc:date>
    </item>
  </channel>
</rss>

