<?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: Problem with Merge in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118615#M6198</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to add either a KEEP= or DROP= option to the output data sets to get the variables you want. The choice would depend on which creates a longer list. It might look something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'Courier New'; background: white; color: navy; font-size: 10pt;"&gt;data &lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;LOS_final_1 ( keep = Discharge_Quarter var1 var2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MORT_final_1 ( drop = var5-var15)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;READMITS_final_1 (keep = list of variable names you want)&lt;/SPAN&gt;&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Sep 2012 15:32:24 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2012-09-11T15:32:24Z</dc:date>
    <item>
      <title>Problem with Merge</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118614#M6197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; When I do this step i am not getting a and b merged instead the info available in other dataset also appears . Likewise with c and d&amp;nbsp; and e and f also..........!!!!Can somebody help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;data &lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;LOS_final_1 &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;MORT_final_1 &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;READMITS_final_1&lt;/SPAN&gt;&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;merge&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;LOS_ranks(&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=a) LOS_Percentiles(&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=b)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;MORT_ranks(&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=c) MORT_Percentiles(&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=d)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;READMITS_ranks(&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=e) READMITS_Percentiles(&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=f);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;Discharge_Quarter;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;if a and b then output &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;LOS_final_1;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;if c and d then output &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;MORT_final_1;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;if e and f then output &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;READMITS_final_1;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 15:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118614#M6197</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-09-11T15:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Merge</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118615#M6198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to add either a KEEP= or DROP= option to the output data sets to get the variables you want. The choice would depend on which creates a longer list. It might look something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'Courier New'; background: white; color: navy; font-size: 10pt;"&gt;data &lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;LOS_final_1 ( keep = Discharge_Quarter var1 var2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MORT_final_1 ( drop = var5-var15)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;READMITS_final_1 (keep = list of variable names you want)&lt;/SPAN&gt;&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 15:32:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118615#M6198</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-09-11T15:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Merge</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118616#M6199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The variablke names are different for each of these datasets except for only 2 variable names which are common to all the rank datasets.&lt;/P&gt;&lt;P&gt;the variable names for the percentiles dataset are different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BASICALLY I DINT WANT TO DO THIS STEP:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;BR /&gt;LOS_final_1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;merge &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;LOS_ranks(&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=a) LOS_Percentiles(&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=b);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;by &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;Discharge_Quarter;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;data &lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;MORT_final_1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;merge &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;MORT_ranks(&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=a) MORT_Percentiles(&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=b);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;BR /&gt;Discharge_Quarter;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;data &lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;READMITS_final_1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;merge &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;READMITS_ranks(&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=a) READMITS_Percentiles(&lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=b);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;by &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;Discharge_Quarter;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 15:42:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118616#M6199</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-09-11T15:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Merge</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118617#M6200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you need to rename your variables because if you merge with the same variable names they will overwrite each other.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 15:52:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118617#M6200</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-09-11T15:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Merge</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118618#M6201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why would you not use 3 DATA steps, each with its own MERGE?&amp;nbsp; That program does exactly what you need.&amp;nbsp; What is the reason for trying to switch?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 15:57:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118618#M6201</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-09-11T15:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Merge</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118619#M6202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats a good question. That works perfectly fine. But since i am a beginner in using sas programming i am trying to learn all the possible ways.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 16:05:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118619#M6202</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-09-11T16:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Merge</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118620#M6203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then this illustrates a good lesson.&amp;nbsp; While there are often many ways to achieve an acceptable solution in SAS, pick the right tool for the job.&amp;nbsp; If you do, your program will usually be short and simple.&amp;nbsp; If you pick the wrong tool for the job, your program will become complex and more difficult to work with.&amp;nbsp; Occasionally, a programming objective requires complexity.&amp;nbsp; (Unfortunately, if you hang out here you see a non-representative sample of more complex problems, not the simple ones.)&amp;nbsp; As a general rule, if your program is become complex, think about whether there is another way to get what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 16:11:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problem-with-Merge/m-p/118620#M6203</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-09-11T16:11:17Z</dc:date>
    </item>
  </channel>
</rss>

