<?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: Predefined sample selection in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Predefined-sample-selection/m-p/549280#M152385</link>
    <description>&lt;P&gt;Some additional information seems likely to be needed.&lt;/P&gt;
&lt;P&gt;Do you need to know the probability of selection or sample weight value for any of these selections?&lt;/P&gt;
&lt;P&gt;What is the total number of the numbers of records to be selected per site code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example you provide for number of records needed averages over 350 per site. If that average is the same across all 800 site codes then that would mean that you need over 285000 records and that will not be possible from 50000 customer records.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have any secondary rules you haven't mentioned such as if some sites may not be able to meet the goal without duplicating a customer which site the customer should be assigned to?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Apr 2019 14:21:44 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-04-08T14:21:44Z</dc:date>
    <item>
      <title>Predefined sample selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Predefined-sample-selection/m-p/549254#M152379</link>
      <description>&lt;P&gt;Good day&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a two dataset as shown below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dataset1 customer_name and sitecode (has 50000 observation unique on customer_name)&lt;/P&gt;&lt;P&gt;sam 2430&lt;/P&gt;&lt;P&gt;nice 3401&lt;/P&gt;&lt;P&gt;jim 2030&lt;/P&gt;&lt;P&gt;holl 3540&lt;/P&gt;&lt;P&gt;and so on&lt;/P&gt;&lt;P&gt;dataset2 sitecode and required_number_of_customer (this dataset show the site and number of customers required per site and not repeating and this dataset contains 800 observation all unique on site code)&lt;/P&gt;&lt;P&gt;2430 60&lt;/P&gt;&lt;P&gt;4020 10&lt;/P&gt;&lt;P&gt;3540 2000&lt;/P&gt;&lt;P&gt;and so on&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the requirement is that i should create one dataset that is going to contain number of unique customers according to the observation required per site&lt;/P&gt;&lt;P&gt;if the customer is selected to site 2430 should not be included on other site&amp;nbsp;&lt;/P&gt;&lt;P&gt;also flag selected customers so they wont get selected on the next run&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;apologies i am new to SAS i currently dont have any code&lt;/P&gt;&lt;P&gt;Your help will be highly appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;N&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 13:25:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Predefined-sample-selection/m-p/549254#M152379</guid>
      <dc:creator>nathilanga</dc:creator>
      <dc:date>2019-04-08T13:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Predefined sample selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Predefined-sample-selection/m-p/549258#M152381</link>
      <description>&lt;P&gt;I don't understand very well, what i understood is that you maybe need a merge.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data dataset3 ;

MERGE dataset1 (in = A) dateset2 (in=B) ;&lt;BR /&gt;&lt;BR /&gt;by sitecode ;

if A and B ;

run ;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Maybe something like that ?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 13:33:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Predefined-sample-selection/m-p/549258#M152381</guid>
      <dc:creator>Onizuka</dc:creator>
      <dc:date>2019-04-08T13:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Predefined sample selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Predefined-sample-selection/m-p/549280#M152385</link>
      <description>&lt;P&gt;Some additional information seems likely to be needed.&lt;/P&gt;
&lt;P&gt;Do you need to know the probability of selection or sample weight value for any of these selections?&lt;/P&gt;
&lt;P&gt;What is the total number of the numbers of records to be selected per site code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example you provide for number of records needed averages over 350 per site. If that average is the same across all 800 site codes then that would mean that you need over 285000 records and that will not be possible from 50000 customer records.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have any secondary rules you haven't mentioned such as if some sites may not be able to meet the goal without duplicating a customer which site the customer should be assigned to?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 14:21:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Predefined-sample-selection/m-p/549280#M152385</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-08T14:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Predefined sample selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Predefined-sample-selection/m-p/549573#M152502</link>
      <description>&lt;P&gt;Good day&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is merging my goal out of lets say i have 200 site with and summed required customers for all sites 3000 and my base of customers is 10000 i should have 7000 flagged as not selected one more time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;customerbase has below examples&lt;/P&gt;&lt;P&gt;customername sitecode&lt;/P&gt;&lt;P&gt;ben&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2430&lt;/P&gt;&lt;P&gt;get&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1000&lt;/P&gt;&lt;P&gt;sip&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2430&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;site dataset&lt;/P&gt;&lt;P&gt;sitecode&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; numberofcustomersrequiredpersite&lt;/P&gt;&lt;P&gt;2430&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10&lt;/P&gt;&lt;P&gt;1000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;all customer that should be under 2430 for an example in a base table they must be on site 2430&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 13:04:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Predefined-sample-selection/m-p/549573#M152502</guid>
      <dc:creator>nathilanga</dc:creator>
      <dc:date>2019-04-09T13:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Predefined sample selection</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Predefined-sample-selection/m-p/549575#M152504</link>
      <description>&lt;P&gt;good day&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;one line item I didnt mention is below&amp;nbsp;&lt;/P&gt;&lt;P&gt;all customer that should be under 2430 for an example in a base table they must be on site 2430&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 13:05:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Predefined-sample-selection/m-p/549575#M152504</guid>
      <dc:creator>nathilanga</dc:creator>
      <dc:date>2019-04-09T13:05:31Z</dc:date>
    </item>
  </channel>
</rss>

