<?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 Combining datasets in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Combining-datasets/m-p/530695#M145141</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get two separate boxes (one for newbeta1 and one for newbeta2). I would like to combine it into one printout.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods html body='hists.htm' style=HTMLBlue;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Proc Means Data = newbeta1 Mean Median Max Min CLM;&lt;BR /&gt;var Beta_CCD Beta_FECT Beta_SCCS;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Proc Means Data = newbeta2 Mean Median Max Min CLM;&lt;BR /&gt;var Beta_CCD Beta_FECT Beta_SCCS;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Jan 2019 17:59:26 GMT</pubDate>
    <dc:creator>lewisnovack</dc:creator>
    <dc:date>2019-01-28T17:59:26Z</dc:date>
    <item>
      <title>Combining datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combining-datasets/m-p/530695#M145141</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get two separate boxes (one for newbeta1 and one for newbeta2). I would like to combine it into one printout.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods html body='hists.htm' style=HTMLBlue;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Proc Means Data = newbeta1 Mean Median Max Min CLM;&lt;BR /&gt;var Beta_CCD Beta_FECT Beta_SCCS;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Proc Means Data = newbeta2 Mean Median Max Min CLM;&lt;BR /&gt;var Beta_CCD Beta_FECT Beta_SCCS;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 17:59:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combining-datasets/m-p/530695#M145141</guid>
      <dc:creator>lewisnovack</dc:creator>
      <dc:date>2019-01-28T17:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Combining datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combining-datasets/m-p/530701#M145144</link>
      <description>&lt;P&gt;Put the data together then?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods html body='hists.htm' style=HTMLBlue;

proc means data=newbeta1 mean median max min clm noprint;
  var beta_ccd beta_fect beta_sccs;
  output out=want1;
run;

proc means data=newbeta2 mean median max min clm noprint;
  var beta_ccd beta_fect beta_sccs;
  output out=want2;
run;

data want;
  set want1 want2;
run;

proc print data=want;
run;

ods html close;&lt;/PRE&gt;
&lt;P&gt;Note how I use the code window - its the {i} above post area.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would also ask why you have two datasets, with the same data?&amp;nbsp; Why is there newbeta1 and newbeta2?&amp;nbsp; Why not just put them together with a group by variable, then you only need one proc means (i.e. rarely a good idea to split like data up):&lt;/P&gt;
&lt;PRE&gt;ods html body='hists.htm' style=HTMLBlue;

data newbeta;
  set newbeta1 newbeta2 indsname=tmp;
  dsname=tmp;
run;

proc means data=newbeta mean median max min clm;
  var beta_ccd beta_fect beta_sccs;
  by dsname;
run;

ods html close;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Jan 2019 18:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combining-datasets/m-p/530701#M145144</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-01-28T18:12:48Z</dc:date>
    </item>
  </channel>
</rss>

