<?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: Explanation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Explanation/m-p/369071#M88053</link>
    <description>&lt;P&gt;Maxim 4 comes into play. Just Try It:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data master;
input id value;
cards;
1 3
1 2
2 2
3 4
4 2
4 1
;
run;

data trans;
input id value;
cards;
1 6
2 4
3 5
3 6
4 7
4 8
;
run;

data master;
modify master trans;
by id;
run;

proc print data=master noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is the result:&lt;/P&gt;
&lt;PRE&gt;id    value

 1      6  
 1      2  
 2      4  
 3      6  
 4      8  
 4      1  
&lt;/PRE&gt;
&lt;P&gt;With ID 1, there's a duplicate in the master; only the first observation is updated, the second is unaffected.&lt;/P&gt;
&lt;P&gt;With ID 3, there's a duplicate in the trans; only the last of that takes effect in the master.&lt;/P&gt;
&lt;P&gt;With ID 4, both trans are worked into the first master, with the second taking effect; the second obs in the master stays unaffected.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jun 2017 09:17:46 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-06-21T09:17:46Z</dc:date>
    <item>
      <title>Explanation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Explanation/m-p/369059#M88048</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pls explain me the second point,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://support.sas.com/documentation/cdl/en/common/63294/HTML/default/images/sym01.gif" border="0" alt="[1]" width="14" height="14" /&gt;Duplicate BY Values&lt;/P&gt;&lt;P&gt;Duplicates in the master and transaction data sets affect processing.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;If duplicates exist in the master data set, only the first occurrence is updated because the generated WHERE statement always finds the first occurrence in the master.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;If duplicates exist in the transaction data set, the duplicates are applied one on top of another unless you write an accumulation statement to add all of them to the master observation. Without the accumulation statement, the values in the duplicates overwrite each other so that only the value in the last transaction is the result in the master observation&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 08:48:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Explanation/m-p/369059#M88048</guid>
      <dc:creator>molla</dc:creator>
      <dc:date>2017-06-21T08:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Explanation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Explanation/m-p/369061#M88049</link>
      <description>&lt;P&gt;Please provide context.&lt;/P&gt;
&lt;P&gt;Which documentation are you referring to?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 08:51:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Explanation/m-p/369061#M88049</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-06-21T08:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Explanation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Explanation/m-p/369065#M88051</link>
      <description>&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000173361.htm#a000173363" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000173361.htm#a000173363&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 08:58:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Explanation/m-p/369065#M88051</guid>
      <dc:creator>molla</dc:creator>
      <dc:date>2017-06-21T08:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Explanation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Explanation/m-p/369071#M88053</link>
      <description>&lt;P&gt;Maxim 4 comes into play. Just Try It:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data master;
input id value;
cards;
1 3
1 2
2 2
3 4
4 2
4 1
;
run;

data trans;
input id value;
cards;
1 6
2 4
3 5
3 6
4 7
4 8
;
run;

data master;
modify master trans;
by id;
run;

proc print data=master noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is the result:&lt;/P&gt;
&lt;PRE&gt;id    value

 1      6  
 1      2  
 2      4  
 3      6  
 4      8  
 4      1  
&lt;/PRE&gt;
&lt;P&gt;With ID 1, there's a duplicate in the master; only the first observation is updated, the second is unaffected.&lt;/P&gt;
&lt;P&gt;With ID 3, there's a duplicate in the trans; only the last of that takes effect in the master.&lt;/P&gt;
&lt;P&gt;With ID 4, both trans are worked into the first master, with the second taking effect; the second obs in the master stays unaffected.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 09:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Explanation/m-p/369071#M88053</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-06-21T09:17:46Z</dc:date>
    </item>
  </channel>
</rss>

