<?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: Way to resume PROC SORT from LCK file? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144944#M38510</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Going further into details. Would avoid using Tagsort. &lt;A href="http://support.sas.com/documentation/cdl/en/hostunx/67285/HTML/default/viewer.htm#n1svfqjvm6a2sfn1abq0g48bhymm.htm" title="http://support.sas.com/documentation/cdl/en/hostunx/67285/HTML/default/viewer.htm#n1svfqjvm6a2sfn1abq0g48bhymm.htm"&gt;SAS(R) 9.4 Companion for UNIX Environments, Third Edition&lt;/A&gt; ( &lt;A id="n1svfqjvm6a2sfn1abq0g48bhymm"&gt;&lt;/A&gt;SORT Procedure: UNIX) It is single threaded, normally the last rescue when you have disk-space problems. In a one run situation this will do, but when needing to run it more often there are smarter approaches.&lt;/P&gt;&lt;P&gt;Better tuning of your IO system (ask your admin). Splitting up a too big dataset in&amp;nbsp; smaller portions and do the merge (as described by Peter C / SASkiwi ) will help.&lt;/P&gt;&lt;P&gt;Still having problems and there is also budget, than you could do some investigations on the mentioned host sort syncsort.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 May 2014 06:30:50 GMT</pubDate>
    <dc:creator>jakarman</dc:creator>
    <dc:date>2014-05-06T06:30:50Z</dc:date>
    <item>
      <title>Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144937#M38503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was running a PROC SORT on a very large set of data (was running for about 2 weeks) when my SAS server rebooted and all jobs running were stopped. My sort was almost finished (of course!) and I don't have time to wait another 2 weeks for this job to re-run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The LCK file from this sort is still in my work folder. Is there any way to pick up the job where it left off before the reboot using the LCK? Any suggestions/ideas will be very much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 15:00:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144937#M38503</guid>
      <dc:creator>abeck19</dc:creator>
      <dc:date>2014-05-05T15:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144938#M38504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It may be worth describing your data and the sort options used as that is a very long time for a sort to run.&lt;/P&gt;&lt;P&gt;I suspect you may not be able to do much with the dataset as long as that LCK file exists.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 15:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144938#M38504</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-05-05T15:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144939#M38505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The .lck file is the temporary name that will be used to give the definitive name when ready. First deleting the original dataset when overwriting that.&lt;/P&gt;&lt;P&gt;As the sort process was in the merge stage there must be some #utl files in a saswork directory.&lt;/P&gt;&lt;P&gt;You cannot restart this process because there is no restart for the proc sort defined.&amp;nbsp; As simple and possible frustrating start again at your last known correct state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Possible you could use checkpoint restart in your code.&amp;nbsp; &lt;A href="https://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#n1nzmsupywf45qn1m6j1eczg1cb4.htm#p0vrr5cxunbzstn1t9iv03tuplfa" title="https://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#n1nzmsupywf45qn1m6j1eczg1cb4.htm#p0vrr5cxunbzstn1t9iv03tuplfa"&gt;SAS(R) 9.3 Language Reference: Concepts, Second Edition&lt;/A&gt;. The restart actions can be handed to operations guys. &lt;/P&gt;&lt;P&gt;Still it is not possible to restart somewhere in the middle when executing a proc,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 16:02:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144939#M38505</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-05-05T16:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144940#M38506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The data is information on impressions of some internet banner ads. Without going into too much detail, included in the data are the user's ID, ad ID, time, website, and some other identifiers. I am dealing with billions of impressions and thus billions of observations - hence the long sort time. I use the tagsort option and am sorting my data on user ID and time so that I can then "roll up" my data by user ID. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having an admin delete the LCK and/or copying the dataset to a new name would not be an issue - I just don't really have the time to restart the entire sort process. Ideally there would be some way to resume the sort from where it left off using the LCK file but it seems that this is not possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 16:07:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144940#M38506</guid>
      <dc:creator>abeck19</dc:creator>
      <dc:date>2014-05-05T16:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144941#M38507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you are doing any kind of roll-up as you handle your data, I would suggest:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;having your internet-search-trawl create a view rather than data&lt;/LI&gt;&lt;LI&gt;roll-up that "view" with proc summary&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;then you only host summary data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is impractical to wait 2 weeks for a sort!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If my suggestion is not relevant because you only want to summarize the results of that internet search, try performing your routine in blocks of fifty million rows, interleave (set with a by statement) the results,&amp;nbsp;&amp;nbsp; then summarize that collection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on your data it might take only a day (or less)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good luck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 16:17:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144941#M38507</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-05-05T16:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144942#M38508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Performing the sort in blocks may work - even if it takes a day or two, that's better than another 2 weeks. Any chance you could provide an example/sample code? I would certainly call myself a SAS newbie and am not sure of how I would execute your suggestion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 16:24:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144942#M38508</guid>
      <dc:creator>abeck19</dc:creator>
      <dc:date>2014-05-05T16:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144943#M38509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a simple example with two sort blocks:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data = data1;&lt;/P&gt;&lt;P&gt;by sort_vars;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data = data2;&lt;/P&gt;&lt;P&gt;by sort_vars;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data combined;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set data1 data2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by sort_vars;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The combined dataset maintains the sort order of the of the block1 and block2 datasets- this is interleaving as described by Peter C. Try it yourself on some test data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 00:49:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144943#M38509</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2014-05-06T00:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144944#M38510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Going further into details. Would avoid using Tagsort. &lt;A href="http://support.sas.com/documentation/cdl/en/hostunx/67285/HTML/default/viewer.htm#n1svfqjvm6a2sfn1abq0g48bhymm.htm" title="http://support.sas.com/documentation/cdl/en/hostunx/67285/HTML/default/viewer.htm#n1svfqjvm6a2sfn1abq0g48bhymm.htm"&gt;SAS(R) 9.4 Companion for UNIX Environments, Third Edition&lt;/A&gt; ( &lt;A id="n1svfqjvm6a2sfn1abq0g48bhymm"&gt;&lt;/A&gt;SORT Procedure: UNIX) It is single threaded, normally the last rescue when you have disk-space problems. In a one run situation this will do, but when needing to run it more often there are smarter approaches.&lt;/P&gt;&lt;P&gt;Better tuning of your IO system (ask your admin). Splitting up a too big dataset in&amp;nbsp; smaller portions and do the merge (as described by Peter C / SASkiwi ) will help.&lt;/P&gt;&lt;P&gt;Still having problems and there is also budget, than you could do some investigations on the mentioned host sort syncsort.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 06:30:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144944#M38510</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-05-06T06:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144945#M38511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank &lt;A __default_attr="312252" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt; for domonstrating the interleave when I was off-line for so long....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should add a little more:&lt;/P&gt;&lt;P&gt;Because the starting data set is so large, it would be great if it is already in a base SAS dataset. Then we can use dataset options to read only a part of the set&lt;/P&gt;&lt;P&gt;proc sort data=your.data( obs=20000000 firstobs=10000001 )&lt;/P&gt;&lt;P&gt;&amp;nbsp; Out= set10e6 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by the by vars ;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should sort the 10 million rows&amp;nbsp; from row 10 million and 1 to row 20million&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro language or even call execute in a datastep could automate this selection of blocks of data "by row number".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you knew all the values of one of those sort keys, even better performance would be available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PeterC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 06:52:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144945#M38511</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-05-06T06:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144946#M38512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using the following code would be better for sorting a large table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data F M;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set class;&lt;/P&gt;&lt;P&gt; if sex="F" then output F;&lt;/P&gt;&lt;P&gt;&amp;nbsp; esle if sex="M" then output M;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that :&lt;/P&gt;&lt;P&gt;proc append ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 11:26:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144946#M38512</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-05-06T11:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144947#M38513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Xia, nice approach it is making the data process easier. With some G-s (10**9) on input records and possible streamprocessing as the source are some internet-banners (click analysis) I would have expected you to go to using the hash-object approach. That can be an interesting way to solve some kind of problems. It think Abeck19 is not that far, we will lose him/&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 12:01:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144947#M38513</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-05-06T12:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144948#M38514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="8872" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;Thanks. Actually I took this idea from someone( I don't remember ).&lt;/P&gt;&lt;P&gt;About Hash Table you said, it is easy, hash table has already built-in function to sort data, but That is not suitable for this situation( large table ), you know no one could have so huge memory .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data _null_;
if 0 then set sashelp.class;
 declare hash h(dataset:'sashelp.class',ordered:'a',multidata:'y');
&amp;nbsp; h.definekey('sex');
&amp;nbsp; h.definedata(all:'y');
&amp;nbsp; h.definedone();

&amp;nbsp; h.output(dataset:'want');
&amp;nbsp; stop;
&amp;nbsp; run;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 12:21:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144948#M38514</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-05-06T12:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144949#M38515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is the roll-up of GBs of data that prompted a suggestion of proc summary operating on blocks or subsets.&amp;nbsp; As proc summary is more memory-based and reduces i/o on output it provides a trade-off but demands memory so that is an issue to manage. Of course a hash approach would be top if the result set could sit in available memory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;To start discovery of potential for all these alternatives we would do a nLevels analysis of the sort keys or roll-up variables, with proc freq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 12:23:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144949#M38515</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-05-06T12:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144950#M38516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="645292" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; Maybe you saw this SAScomminity.org tip &lt;SPAN style="color: #0e66ba; font-size: 12pt; font-style: inherit; font-family: inherit; text-decoration: underline; font-weight: inherit;"&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/thread/49797"&gt;HASH sort (SAScommunity.org tip-of-the-day 08OCT2013)&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I applied CALL VNEXT to generalize it somewhat. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0e66ba; font-size: 12pt; font-style: inherit; font-family: inherit; text-decoration: underline; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 12:35:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144950#M38516</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-05-06T12:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144951#M38517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;with a test run to create a 6GB sas dataset, then first sort it in blocks then do a rollup (proc summary) in blocks of increasing size, here is some code to demonstrate the blocks suggestion I was making&lt;/P&gt;&lt;P&gt;data tlarge ;&lt;/P&gt;&lt;P&gt;set sampsio.empinfo; * should be available, just try it;&lt;/P&gt;&lt;P&gt;do _n_=1 to 1e5;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%let byv = divcode division ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname user ( './' work ) ;&lt;/P&gt;&lt;P&gt;data _null_; &lt;/P&gt;&lt;P&gt;retain start 1 ;&lt;/P&gt;&lt;P&gt;do exp=4 to 8 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; block=10 ** exp ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; call execute( 'proc sort data= tlarge( firstobs=' !! put( start, 9.-L ) ) ;&lt;/P&gt;&lt;P&gt; call execute( ' obs = ' !! put( block, 9.-L ) ) ;&lt;/P&gt;&lt;P&gt; call execute( ') out=tlarg_' !! put( start, 9.-L ) ) ;&lt;/P&gt;&lt;P&gt; call execute( "; by &amp;amp;byv ; run ;" );&lt;/P&gt;&lt;P&gt; start = block+1 ;&lt;/P&gt;&lt;P&gt; end ;&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 _null_; &lt;/P&gt;&lt;P&gt;retain start 1 ;&lt;/P&gt;&lt;P&gt;do exp=4 to 8 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; block=10 ** exp ; &lt;/P&gt;&lt;P&gt; call execute( 'proc summary data= tlarge( firstobs=' !! put( start, 9.-L ) ) ;&lt;/P&gt;&lt;P&gt; call execute( ' obs = ' !! put( block, 9.-L ) ) ;&lt;/P&gt;&lt;P&gt; call execute( ') missing noprint nway ; ' );&lt;/P&gt;&lt;P&gt; call execute( "class &amp;amp;byv ; var _numeric_ ;" );&lt;/P&gt;&lt;P&gt; call execute( 'output sum=&amp;nbsp; out= tlasum' !!&amp;nbsp; put( start, 9.-L ) ) ;&lt;/P&gt;&lt;P&gt; call execute( "; run ;" );&lt;/P&gt;&lt;P&gt; start = block+1 ;&lt;/P&gt;&lt;P&gt; end ;&lt;/P&gt;&lt;P&gt; run ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 May 2014 16:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144951#M38517</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-05-10T16:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144952#M38518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi abeck19,&lt;/P&gt;&lt;P&gt;My solution is similar then the previous ones, but is &lt;STRONG&gt;applicable only&lt;/STRONG&gt; if you are lucky enough, that &lt;STRONG&gt;your dataset is sorted by date/time&lt;/STRONG&gt;. (Not by id and then by time as you require) Since you have web log data it is quite likely... In the following example it is enough if it is groupped by day.&lt;/P&gt;&lt;P&gt;And I also assume, you don't need a raw sort, but some kind of aggregation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc summary data=in nway;&lt;/P&gt;&lt;P&gt;var amount;&lt;/P&gt;&lt;P&gt;class id;&lt;/P&gt;&lt;P&gt;by datetime;&lt;/P&gt;&lt;P&gt;format datetime datetime7.;&lt;/P&gt;&lt;P&gt;output out=out sum=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you have data grouped by &lt;STRONG&gt;day&lt;/STRONG&gt; and &lt;STRONG&gt;id&lt;/STRONG&gt;. Hopefully it is smaller, and you can process it. You can control the aggregation level with the format statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everyone: Is this really &lt;STRONG&gt;faster:&lt;/STRONG&gt; Dividing a dataset, sorting separately, then interleaving? This is what almost all sort algorithms are supposed to do internally (called "merge sort").&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 16:07:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144952#M38518</guid>
      <dc:creator>gergely_batho</dc:creator>
      <dc:date>2014-05-12T16:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144953#M38519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The big problem in SAS sorting is the sortwork areas. These demand at least twice the original filesize and perhaps 3 or 4 times. And that's before it completes in a reasonable time.&lt;/P&gt;&lt;P&gt;proc summary uses memory arrays to collect its stats - providing a different constraint. Despite that it privides what I think is the simplest approach.&lt;/P&gt;&lt;P&gt;As I (weakly) demonstrated earlier, proc sumnary can be executed in hadoop-style blocks. (I should have extended the demo to show consolidation /summarization / rollup of the blocks)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 17:16:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144953#M38519</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-05-12T17:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144954#M38520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It has always been the best approach to make your data smaller while not losing information. It will always be so when you are going beyond the comfort zone of your machine.&lt;/P&gt;&lt;P&gt;It will never have unlimited speed and unlimited storage resources. As at the moment you are hitting that you need to think harder. More clever approach to the data or you analyses. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Gergely, your proposal is going back to that question. When the assumptions are not met still an issue. It also depend how often it should be executed.&lt;/P&gt;&lt;P&gt;A Hadoop style is asking a lot of storage, even more as just sorting. It is designed to be most read-only access while have a lot of spread data duplications. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 17:26:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144954#M38520</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-05-12T17:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Way to resume PROC SORT from LCK file?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144955#M38521</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;I know you know it, but still want to clarify: The example above also executes in blocks. Because of the by statement.&lt;/P&gt;&lt;P&gt;If daily data does not fit into memory, just change the format. Flexible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2014 09:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Way-to-resume-PROC-SORT-from-LCK-file/m-p/144955#M38521</guid>
      <dc:creator>gergely_batho</dc:creator>
      <dc:date>2014-05-13T09:51:06Z</dc:date>
    </item>
  </channel>
</rss>

