<?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: Issue with merging in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Issue-with-merging/m-p/557206#M9956</link>
    <description>&lt;P&gt;So, what does the desired output look like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What role do the Count,&amp;nbsp;Emp_name,&amp;nbsp; Emp_Status or ECN&amp;nbsp;variables in the&amp;nbsp;assigned or managers&amp;nbsp;data set actually play in this problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hint: Reduce the problem example data to about 10 accounts in the&amp;nbsp; unmapped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Reduce the Assigned and manager data set to a similar size, have such so that some of the "unmapped" will stay unmapped and some will be assigned.&lt;/P&gt;
&lt;P&gt;A small enough example that you can manually create and demonstrate (show us) the desired data set.&lt;/P&gt;
&lt;P&gt;ONLY show the variables actually used/ need in the input and output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 May 2019 17:50:22 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-05-08T17:50:22Z</dc:date>
    <item>
      <title>Issue with merging</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Issue-with-merging/m-p/557045#M9939</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing an issue with merging.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have two data sets -&lt;/P&gt;&lt;P&gt;1) unmapped - having account numbers which are not mapped to any manager along with branch code (brcode)&lt;/P&gt;&lt;P&gt;2)managersFinal - this data set contains list of available managers along with their branch code. Since 1 manager can hold multiple accounts, therefore their names are repeated as many times.&lt;/P&gt;&lt;P&gt;other info:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;there are more than 100 branches - brcode ranges from 1-150&lt;/LI&gt;&lt;LI&gt;unmapped account can only be assigned to manager of same branch&lt;/LI&gt;&lt;LI&gt;output dataset should contain only those accounts which are mapped&lt;/LI&gt;&lt;/UL&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;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="managersfinal.PNG" style="width: 598px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29296i1B9FDF3A5B677664/image-size/large?v=v2&amp;amp;px=999" role="button" title="managersfinal.PNG" alt="managersfinal.PNG" /&gt;&lt;/span&gt;&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;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="unmapped.PNG" style="width: 500px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29295iCF7842254A12AD26/image-size/large?v=v2&amp;amp;px=999" role="button" title="unmapped.PNG" alt="unmapped.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the code that i am trying but not working is -&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data assigned;
merge unmapped (in=a)  managersfinal (in=b);
by brcode;
if a;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;attached are images of datasets.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 09:36:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Issue-with-merging/m-p/557045#M9939</guid>
      <dc:creator>Abhiraj</dc:creator>
      <dc:date>2019-05-08T09:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with merging</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Issue-with-merging/m-p/557071#M9944</link>
      <description>&lt;P&gt;What do you mean by 'not working'? Given you posted data, what do you expect the result to look like? And what does your code give you?&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 12:04:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Issue-with-merging/m-p/557071#M9944</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-05-08T12:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with merging</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Issue-with-merging/m-p/557099#M9946</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Thanks for your reply. I am attaching datasets i am working on and output i am getting. I will explain what output i need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dataset unmapped - contains branch code(brcode) and account id which arent mapped&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dataset managersFinal - contains list of managers who can be assigned those accounts. this dataset contains names of managers multiple times, indicating those many more accounts can be assigned to them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dataset assigned - the output i am getting when i execute following data step -&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data icici.assigned;
merge unmapped (in=a)  managersfinal (in=b);
by brcode;
if  a and b ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;issue with my output:&lt;/P&gt;&lt;P&gt;total observations for branch 1 in the unmapped dataset are 148&lt;/P&gt;&lt;P&gt;total managers that can be assigned account for&amp;nbsp; &amp;nbsp;branch 1 are 366&lt;/P&gt;&lt;P&gt;so output dataset should contain only 148 observations for branch 1&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;we need to merge datasets based on branch code value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected output -&amp;nbsp;&lt;/P&gt;&lt;P&gt;fin&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 13:18:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Issue-with-merging/m-p/557099#M9946</guid>
      <dc:creator>Abhiraj</dc:creator>
      <dc:date>2019-05-08T13:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with merging</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Issue-with-merging/m-p/557206#M9956</link>
      <description>&lt;P&gt;So, what does the desired output look like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What role do the Count,&amp;nbsp;Emp_name,&amp;nbsp; Emp_Status or ECN&amp;nbsp;variables in the&amp;nbsp;assigned or managers&amp;nbsp;data set actually play in this problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hint: Reduce the problem example data to about 10 accounts in the&amp;nbsp; unmapped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Reduce the Assigned and manager data set to a similar size, have such so that some of the "unmapped" will stay unmapped and some will be assigned.&lt;/P&gt;
&lt;P&gt;A small enough example that you can manually create and demonstrate (show us) the desired data set.&lt;/P&gt;
&lt;P&gt;ONLY show the variables actually used/ need in the input and output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 17:50:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Issue-with-merging/m-p/557206#M9956</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-08T17:50:22Z</dc:date>
    </item>
  </channel>
</rss>

