<?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: stacking datasets horizontally in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467738#M119428</link>
    <description>&lt;P&gt;That's a report. If you want the table at the top, look at PROC REPORT or PROC TABULATE for starters. You can find a paper called 'Creating Complex Reports' by Cynthia Zender, it has a lot of good examples and code that illustrate how to get the reports you've shown.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/208127"&gt;@manya92&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The individual datasets look like in the word file.. and the excel table&amp;nbsp; is what it should look like :&lt;/P&gt;
&lt;P&gt;I was thinknig of using MACROS and merge datastep .. but dont know how to use macros.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro main(drug, where)&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;%mend main ;&lt;BR /&gt;%main(oni, new_linename EQ 'Onivyde');&lt;BR /&gt;%main(fol, new_linename EQ 'FOLFOX');&lt;BR /&gt;%main(folnox, new_linename EQ 'FOLFIRINOX');&lt;BR /&gt;%main(folfri, new_linename EQ 'FOLFIRI');&lt;BR /&gt;%main(gem, new_linename EQ 'Gemcitabine,Paclitaxel Protein-Bound');&lt;BR /&gt;%main(all, new_linename in ('Onivyde','FOLFOX','FOLFIRI','FOLFIRINOX','Gemcitabine,Paclitaxel Protein-Bound')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;datastep :-&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _03_stack ;&lt;BR /&gt;merge _03_oni _03_fol _03_folnox _03_folfri _03_gem _03_all ;&lt;BR /&gt;by a col ;&lt;BR /&gt;run ;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jun 2018 17:14:06 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-06-05T17:14:06Z</dc:date>
    <item>
      <title>stacking datasets horizontally</title>
      <link>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467718#M119423</link>
      <description>&lt;P&gt;How to stack mroe than 2&amp;nbsp; datasets horizontally ? using sas or PROC SQL .&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 16:49:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467718#M119423</guid>
      <dc:creator>manya92</dc:creator>
      <dc:date>2018-06-05T16:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: stacking datasets horizontally</title>
      <link>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467720#M119424</link>
      <description>&lt;P&gt;In a SAS data set, the MERGE statement allows you to do this.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 16:55:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467720#M119424</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-06-05T16:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: stacking datasets horizontally</title>
      <link>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467721#M119425</link>
      <description>&lt;P&gt;Example data and desired output for the example data would help.&lt;/P&gt;
&lt;P&gt;If the data is to match on some variable(s) it is important to know if the values of the match variables are unique (only one record per data set) or duplicated and if duplicated in which data set(s).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When a one-to-one combining often the SAS data step merge is easiest but does require sorting both data sets by the matching variables first.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 16:55:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467721#M119425</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-05T16:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: stacking datasets horizontally</title>
      <link>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467724#M119427</link>
      <description>&lt;P&gt;The individual datasets look like in the word file.. and the excel table&amp;nbsp; is what it should look like :&lt;/P&gt;&lt;P&gt;I was thinknig of using MACROS and merge datastep .. but dont know how to use macros.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro main(drug, where)&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;%mend main ;&lt;BR /&gt;%main(oni, new_linename EQ 'Onivyde');&lt;BR /&gt;%main(fol, new_linename EQ 'FOLFOX');&lt;BR /&gt;%main(folnox, new_linename EQ 'FOLFIRINOX');&lt;BR /&gt;%main(folfri, new_linename EQ 'FOLFIRI');&lt;BR /&gt;%main(gem, new_linename EQ 'Gemcitabine,Paclitaxel Protein-Bound');&lt;BR /&gt;%main(all, new_linename in ('Onivyde','FOLFOX','FOLFIRI','FOLFIRINOX','Gemcitabine,Paclitaxel Protein-Bound')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;datastep :-&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _03_stack ;&lt;BR /&gt;merge _03_oni _03_fol _03_folnox _03_folfri _03_gem _03_all ;&lt;BR /&gt;by a col ;&lt;BR /&gt;run ;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 17:08:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467724#M119427</guid>
      <dc:creator>manya92</dc:creator>
      <dc:date>2018-06-05T17:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: stacking datasets horizontally</title>
      <link>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467738#M119428</link>
      <description>&lt;P&gt;That's a report. If you want the table at the top, look at PROC REPORT or PROC TABULATE for starters. You can find a paper called 'Creating Complex Reports' by Cynthia Zender, it has a lot of good examples and code that illustrate how to get the reports you've shown.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/208127"&gt;@manya92&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The individual datasets look like in the word file.. and the excel table&amp;nbsp; is what it should look like :&lt;/P&gt;
&lt;P&gt;I was thinknig of using MACROS and merge datastep .. but dont know how to use macros.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro main(drug, where)&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;%mend main ;&lt;BR /&gt;%main(oni, new_linename EQ 'Onivyde');&lt;BR /&gt;%main(fol, new_linename EQ 'FOLFOX');&lt;BR /&gt;%main(folnox, new_linename EQ 'FOLFIRINOX');&lt;BR /&gt;%main(folfri, new_linename EQ 'FOLFIRI');&lt;BR /&gt;%main(gem, new_linename EQ 'Gemcitabine,Paclitaxel Protein-Bound');&lt;BR /&gt;%main(all, new_linename in ('Onivyde','FOLFOX','FOLFIRI','FOLFIRINOX','Gemcitabine,Paclitaxel Protein-Bound')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;datastep :-&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _03_stack ;&lt;BR /&gt;merge _03_oni _03_fol _03_folnox _03_folfri _03_gem _03_all ;&lt;BR /&gt;by a col ;&lt;BR /&gt;run ;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 17:14:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467738#M119428</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-05T17:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: stacking datasets horizontally</title>
      <link>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467748#M119429</link>
      <description>&lt;P&gt;Your word document shows reports, not data sets. You might be much better off finding the data sets used to create the report tables, combine those and make a new report from the combined data.&lt;/P&gt;
&lt;P&gt;Especially since the two tables you show in your document do not look alike.&lt;/P&gt;
&lt;P&gt;Or show what your actual datasets look like as that document may be very misleading.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 17:17:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467748#M119429</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-05T17:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: stacking datasets horizontally</title>
      <link>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467752#M119430</link>
      <description>&lt;P&gt;I don't see any compelling reason to use a macro here. But if it is already written ...&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 17:19:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/stacking-datasets-horizontally/m-p/467752#M119430</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-06-05T17:19:07Z</dc:date>
    </item>
  </channel>
</rss>

