<?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: MERGING DO LOOP in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/MERGING-DO-LOOP/m-p/230033#M41687</link>
    <description>&lt;P&gt;Please provide valid and tested SAS syntax creating DATA ONE and DATA TWO.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Untested (as I didn't feel like fixing the data steps)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  create table want as
  select *
  from one,two
  ;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2015 09:27:51 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2015-10-15T09:27:51Z</dc:date>
    <item>
      <title>MERGING DO LOOP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MERGING-DO-LOOP/m-p/230027#M41681</link>
      <description>&lt;P&gt;Data one; input var1 $;&lt;/P&gt;
&lt;P&gt;datalines;&lt;/P&gt;
&lt;P&gt;scan&lt;/P&gt;
&lt;P&gt;MRI&lt;/P&gt;
&lt;P&gt;;run;&lt;/P&gt;
&lt;P&gt;Data two; input res1 res2;&lt;/P&gt;
&lt;P&gt;datalines;&lt;/P&gt;
&lt;P&gt;10&lt;/P&gt;
&lt;P&gt;45&lt;/P&gt;
&lt;P&gt;13&lt;/P&gt;
&lt;P&gt;56&lt;/P&gt;
&lt;P&gt;; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OUTPUT: IN ONE DATASET&lt;/P&gt;
&lt;P&gt;Var1 res1 res2&lt;/P&gt;
&lt;P&gt;scan 10 45&lt;/P&gt;
&lt;P&gt;scan 13 56&lt;/P&gt;
&lt;P&gt;MRI 10 45&lt;/P&gt;
&lt;P&gt;MRI 13 56&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 09:34:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MERGING-DO-LOOP/m-p/230027#M41681</guid>
      <dc:creator>anitapamu2</dc:creator>
      <dc:date>2015-10-15T09:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: MERGING DO LOOP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MERGING-DO-LOOP/m-p/230033#M41687</link>
      <description>&lt;P&gt;Please provide valid and tested SAS syntax creating DATA ONE and DATA TWO.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Untested (as I didn't feel like fixing the data steps)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  create table want as
  select *
  from one,two
  ;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 09:27:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MERGING-DO-LOOP/m-p/230033#M41687</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-10-15T09:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: MERGING DO LOOP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MERGING-DO-LOOP/m-p/230037#M41688</link>
      <description>&lt;P&gt;Hereafter It will not repeat and Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please help out In Data Step Method ...for the same Problem&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 09:55:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MERGING-DO-LOOP/m-p/230037#M41688</guid>
      <dc:creator>anitapamu2</dc:creator>
      <dc:date>2015-10-15T09:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: MERGING DO LOOP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MERGING-DO-LOOP/m-p/230053#M41696</link>
      <description>&lt;P&gt;The SQL solution already posted is easier, but for a DATA step:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;set one;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;do _n_=1 to _nobs_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; set two point=_n_ nobs=_nobs_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; output;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;end;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 11:22:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MERGING-DO-LOOP/m-p/230053#M41696</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-10-15T11:22:58Z</dc:date>
    </item>
  </channel>
</rss>

