<?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: proc merge in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-merge/m-p/802116#M315744</link>
    <description>&lt;P&gt;If you want to merge, you must do SORT first.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=apple;
by size;
run;

proc sort data=orange;
by size;
run;

data fruit;
merge apple orange;
by size;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also, you do not need "and" in merge statement. Just describe them space-separated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2022 05:44:25 GMT</pubDate>
    <dc:creator>japelin</dc:creator>
    <dc:date>2022-03-15T05:44:25Z</dc:date>
    <item>
      <title>proc merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-merge/m-p/802114#M315742</link>
      <description>&lt;PRE&gt;data fruit;
merge apple and orange;
by size;
run;

proc sort data=apple;
by size;
run;

proc sort data=orange;
by size;
run;
&lt;/PRE&gt;
&lt;P&gt;if I have the code above, is the sorting gonna be done after merging or it can automatically sort first as I am aware that is sas sorting must be done before merging .... unfortunately the code I am encounterin is like the above, I am puzzled if it needs changing or sas would do sorting before merging&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 05:39:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-merge/m-p/802114#M315742</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-03-15T05:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-merge/m-p/802116#M315744</link>
      <description>&lt;P&gt;If you want to merge, you must do SORT first.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=apple;
by size;
run;

proc sort data=orange;
by size;
run;

data fruit;
merge apple orange;
by size;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also, you do not need "and" in merge statement. Just describe them space-separated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 05:44:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-merge/m-p/802116#M315744</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2022-03-15T05:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: proc merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-merge/m-p/802117#M315745</link>
      <description>&lt;P&gt;There is no PROC MERGE, so your subject line is misleading.&lt;/P&gt;
&lt;P&gt;The data step BY(!) will only work if all incoming datasets are properly sorted. This means that your&amp;nbsp;&lt;EM&gt;following&lt;/EM&gt; SORT steps are unnecessary.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 05:46:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-merge/m-p/802117#M315745</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-15T05:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: proc merge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-merge/m-p/802135#M315760</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes you are correct, data sets need to be in the same sort order as the variables in the &lt;FONT face="courier new,courier"&gt;by&lt;/FONT&gt; statement, so this will typically necessitate the data to be sorted before merging, &lt;EM&gt;unless&lt;/EM&gt; the data was received in the required sort order, in which case the &lt;FONT face="courier new,courier"&gt;proc sort&lt;/FONT&gt; steps are not required at all (before or after the merge).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 09:59:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-merge/m-p/802135#M315760</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2022-03-15T09:59:50Z</dc:date>
    </item>
  </channel>
</rss>

