<?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: 10 % of data for all datasets to work more efficiently in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369745#M11156</link>
    <description>&lt;P&gt;what kind of datasets you have. what are the operations you have do. how many columns you need for output dataset. Whether you have indexes on your tables etc.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jun 2017 01:18:58 GMT</pubDate>
    <dc:creator>kiranv_</dc:creator>
    <dc:date>2017-06-23T01:18:58Z</dc:date>
    <item>
      <title>10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369743#M11154</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with huge&amp;nbsp;datasets of more than 7mio datapoints per set. So working on&amp;nbsp;these datasets takes considerable time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I reduce them by working on only 10% of the data? That way I could faster work through all the coding and then apply the codes to the whole dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could&amp;nbsp;sort each dataset by the same (say two ) main variables and take the first 700'000 observations in each dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybodyknow though a faster and more elegant way?&lt;/P&gt;&lt;P&gt;Many thanks,&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;&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>Fri, 23 Jun 2017 00:56:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369743#M11154</guid>
      <dc:creator>AnnaNZ</dc:creator>
      <dc:date>2017-06-23T00:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369744#M11155</link>
      <description>&lt;P&gt;Do it for one set and then use the individuals of this reduced set1 to create the other sets to make sure I have the same individuals to play with ?&lt;/P&gt;&lt;P&gt;Would you merge such set? Rather join it so not to create 'more' individuals than what I have in set1? &amp;nbsp;hmmm&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 01:01:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369744#M11155</guid>
      <dc:creator>AnnaNZ</dc:creator>
      <dc:date>2017-06-23T01:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369745#M11156</link>
      <description>&lt;P&gt;what kind of datasets you have. what are the operations you have do. how many columns you need for output dataset. Whether you have indexes on your tables etc.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 01:18:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369745#M11156</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2017-06-23T01:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369747#M11157</link>
      <description>&lt;P&gt;Currently I am building the spine of the dataset, which will then grow by 800 new modelled variables.&lt;/P&gt;&lt;P&gt;It has repeated Client_Ids and repated Refral_Ids, whereby a&amp;nbsp;&lt;SPAN&gt;Refral_I&lt;/SPAN&gt;&lt;SPAN&gt;d can have multiple Client_Ids - complex&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Finally that dataset will be used for implementing a new, macchine learnt tool&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 01:30:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369747#M11157</guid>
      <dc:creator>AnnaNZ</dc:creator>
      <dc:date>2017-06-23T01:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369752#M11158</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/144103"&gt;@AnnaNZ&lt;/a&gt;&amp;nbsp;- there are lots of ways to create subsets of data to work on. Which technique you use will depend on factors like (for example) how random you want that 10% to be.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thoughts:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Sorting the dataset would automatically "bias" any sampling of the data.&lt;/LI&gt;
&lt;LI&gt;If you have SAS/STAT, there is PROC SURVEYSELECT (&lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_surveyselect_overview.htm" target="_blank"&gt;Click here&lt;/A&gt;)&lt;/LI&gt;
&lt;LI&gt;There are data set tips using the RANUNI() function, which can sample with or without replacement (in other words, whether you care if one observation is randomly reslected or not). Also useful if you don't have SAS/STAT and/or you'd like to output to multiple tables (which the DATA STEP&amp;nbsp;can do and PROC SURVEYSELECT cannot).&lt;/LI&gt;
&lt;LI&gt;Rick Wiklin has posted&amp;nbsp;a couple of SAS blogs &lt;A href="http://blogs.sas.com/content/iml/2014/01/29/sample-with-replacement-in-sas.html" target="_blank"&gt;here (sampling with replacement)&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="http://blogs.sas.com/content/iml/2014/02/03/sample-without-replacement.html" target="_blank"&gt;here (sampling without replacement)&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best of luck!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 02:17:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369752#M11158</guid>
      <dc:creator>AndrewHowell</dc:creator>
      <dc:date>2017-06-23T02:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369753#M11159</link>
      <description>&lt;P&gt;The 10 % datasets are only created to be able to work faster and do not have to represent the whole dataset as such. It is only to created to be able to faster code the 800 variable that will need to be created.&lt;/P&gt;&lt;P&gt;At the end of that excerse I simply take the codes and apply them to the whole datasets.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 02:20:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369753#M11159</guid>
      <dc:creator>AnnaNZ</dc:creator>
      <dc:date>2017-06-23T02:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369756#M11160</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options obs=1000000; *work with only a small portion of your data;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Use the obs option to set the number of records you want to process that will run in an acceptable time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then set it back to max when you're done. NEVER EVER do this while sorting a dataset without replacing it. It will sort only the first N obs that you had selected and you'll lose the rest of the dataset.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options obs=max; * reset to use all obs by default;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 02:24:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369756#M11160</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-06-23T02:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369760#M11161</link>
      <description>&lt;P&gt;Hi Reeza,&amp;nbsp; thank you for your advise. I always create new datasets so i can lways go back to the previous version when something went wrong. I also keep a set of oroginal datasets at a safe place :-).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I did now is , I used now the dataset that will build the spine of this whole set, sorted it by Client-Id and Refer_ID and thern created with this a new dataset, with only 10% of the observations. My idea would be to take these Client-Id and Refer_ID pairs to choose the equivalent Client-Id and / or&amp;nbsp;Refer_ID pairs&amp;nbsp;in the other sets.&lt;/P&gt;&lt;P&gt;Would that work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The next question though, how do I use this subset of (Client-Id and Refer_ID_&lt;STRONG&gt;set 1&lt;/STRONG&gt;)&amp;nbsp;to create data with the same (Client-Id and Refer_ID-&lt;STRONG&gt;set_n&lt;/STRONG&gt;)&amp;nbsp;pairs? When I just merge them then (Client-Id and Refer_ID-set_n) will add all its other Client-Id and Refer_ID pairs to (Client-Id and Refer_ID_set 1).&lt;/P&gt;&lt;P&gt;How do I make sure the other sets have the nthe exacly same Client-Id and Refer_ID pairs?&lt;/P&gt;&lt;P&gt;Are joins the way to go here??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason I need to have these same pairs accross the datasets is because they all are used to ccreate and code new variables accross the other 50 odd datasets I have.&lt;/P&gt;&lt;P&gt;Otherwise I wil not be able to test whether a code made sense ect&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 02:44:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369760#M11161</guid>
      <dc:creator>AnnaNZ</dc:creator>
      <dc:date>2017-06-23T02:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369763#M11162</link>
      <description>&lt;P&gt;I usually just make the N big enough. Even though I'm doing matching, you'll usually see all the issues with 1M or 5M rows, but those process fast enough that it doesn't matter. &amp;nbsp;You'll end up with less N that you set because of the match but that was usually enough for development for me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I always make it a point to test for 'edge' cases in my code. So those are the 'boundaries' of each condition and then one or two random cases. Or in a case of patient/client match I would check for someone with multiple records and single records and what happens when one is not in one or the other dataset. &amp;nbsp;I build these checks into my process anyways, because data changes over time. I can't always assume that things are the same and I've caught many a data change error this way. Especially in cases where people change how the source data is structured only slightly...enough that you miss when looking over, but is caught in the code. An example was a dataset where it went from having a single record per person to having multiple records. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 02:54:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369763#M11162</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-06-23T02:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369766#M11163</link>
      <description>&lt;P&gt;many thanks reeza tat is great information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you join them without creating massive amount of new IDs.&lt;/P&gt;&lt;P&gt;Is the join statement better here - though I read that merge and join essentiually do the same&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;say, I want only datasets with the ID and refer_IDs of dataset 1. How do I extract this info from dataset 2? so Id 2 and 3 should not be incorporated. ?&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;dataset1&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;ID&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;ref_id&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;12&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;4&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;24&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;5&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;24&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;5&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;26&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;36&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;7&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;29&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;7&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;30&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;8&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;31&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;dataset 2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;12&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;8&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;9&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;10&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;3&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;11&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;3&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;11&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;3&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;12&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;4&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;24&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;5&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;24&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;5&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;26&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;6&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;36&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;7&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;29&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;7&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;30&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;8&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;31&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 03:31:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369766#M11163</guid>
      <dc:creator>AnnaNZ</dc:creator>
      <dc:date>2017-06-23T03:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369768#M11164</link>
      <description>&lt;P&gt;I do all my joins via SQL personally, I find it easier to understand. Then I look at the famous SQL graphic to decide what kind of join I need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins" target="_blank"&gt;https://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The good thing about this one is they usually have sample code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So since you want ID's that are in both sets you can use an inner join.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Joins and Merges are the same, MERGE is the statement used in a Data Step. JOIN is the term used in SQL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Union and Append/Concatenate are the same as well, but different terms.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 03:41:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369768#M11164</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-06-23T03:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369777#M11165</link>
      <description>&lt;P&gt;"Joins and Merges are the same.."??&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 05:54:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369777#M11165</guid>
      <dc:creator>AndrewHowell</dc:creator>
      <dc:date>2017-06-23T05:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369798#M11166</link>
      <description>&lt;P&gt;When ever queryoptimization is needed, what I would do is see how each query works, which part of query is running slow and try to find why it i running slow and how can I&amp;nbsp;enhance query performance. With proper techniques, lot of queries can be optimized. Say building indexes can help, a hash join could be better or a join by format. There could be many more techniques&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 09:08:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369798#M11166</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2017-06-23T09:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369853#M11169</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13754"&gt;@AndrewHowell&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;"Joins and Merges are the same.."??&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The concept of a SQL join and data step MERGE - they both try and put the data together 'side by side'. Yes, a SQL join can do things a &amp;nbsp;SAS merge cannot and a Merge can do some things that a Join cannot in some cases.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 13:05:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/369853#M11169</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-06-23T13:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/370218#M11181</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/144103"&gt;@AnnaNZ&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Using SAS Hash tables can be an efficient way to maintain referential integrity between tables when reducing volumes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming the first table has already been reduced using Proc Surveyselect or other techniques then below code demonstrates how you can reduce the volume in the 2nd table while maintaining referential integrity.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ds1_reduced;
  input ID ref_id;
datalines;
1 12
4 24
5 24
5 26
6 36
7 29
7 30
8 31
;
run;

   
data ds2;
  input ID ref_id;
datalines;
1 12
2 8
2 9
2 10
3 11
3 11
3 12
4 24
5 24
5 26
6 36
7 29
7 30
8 31
;
run;

data ds2_reduced;

  if _n_=1 then
    do;
      dcl hash h1(dataset:'ds1_reduced(keep=id ref_id)');
      h1.defineKey('id','ref_id');
      h1.defineDone();
    end;

  set ds2;
  if h1.check()=0 then output;
run;

  &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Jun 2017 04:31:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/370218#M11181</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-06-24T04:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/370310#M11187</link>
      <description>&lt;P&gt;Hi Patrick, very interesting solution, I like it. It works when I use one one variable, and gives the same rulst like an inner joint function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it files the fault below, when I try to do it with both variables. I have yet to find out why.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data Kea.Trail1_102;

  if _n_=1 then
    do;
     dcl hash h1(dataset:'Kea.testdata10 (keep= REFER_ID CL_ID)');
      h1.defineKey('REFER_ID' 'CL_ID');
      h1.defineDone();
    end;
set Kea.Trails_file_1;
 if h1.check()=0 then output;
run;


401  data Kea.Trail1_102;
402
403    if _n_=1 then
404      do;
405       dcl hash h1(dataset:'Kea.testdata10 (keep= REFER_ID CL_ID)');
406        h1.defineKey('REFER_ID' 'CL_ID');
                                   -------
                                   22
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, ',', -, /, &amp;lt;, &amp;lt;=,
              &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT, LE, LT, MAX, MIN, NE, NG, NL, OR, ^=, |, ||,
              ~=.

407        h1.defineDone();
ERROR: DATA STEP Component Object failure.  Aborted during the COMPILATION phase.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

408      end;
409  set Kea.Trails_file_1;
410   if h1.check()=0 then output;
411  run;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Jun 2017 22:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/370310#M11187</guid>
      <dc:creator>AnnaNZ</dc:creator>
      <dc:date>2017-06-24T22:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: 10 % of data for all datasets to work more efficiently</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/370318#M11188</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/144103"&gt;@AnnaNZ&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;That's a simple syntax error. You've missed a comma.&lt;/P&gt;
&lt;P&gt;h1.defineKey('REFER_ID'&lt;FONT size="5"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt; 'CL_ID');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;406        h1.defineKey('REFER_ID' 'CL_ID');
                                   -------
                                   22
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, ',', -, /, &amp;lt;, &amp;lt;=,
              &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT, LE, LT, MAX, MIN, NE, NG, NL, OR, ^=, |, ||,
              ~=.&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2017 23:49:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/10-of-data-for-all-datasets-to-work-more-efficiently/m-p/370318#M11188</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-06-24T23:49:55Z</dc:date>
    </item>
  </channel>
</rss>

