<?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: Create Combined data set with variable based on original table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872349#M344647</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/439355"&gt;@jmmedina252&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello, I need to combine about ten tables all with different names (example: work.weight, work.diagnosis, work.dose) into one table with a variable that specifies their original table name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Could you define "combine"?? Do you want these tables to be combined horizontally, side by side? Or do you want these tables to be combined vertically, one on top of another? Or do you want something else?&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2023 19:16:41 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-04-26T19:16:41Z</dc:date>
    <item>
      <title>Create Combined data set with variable based on original table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872348#M344646</link>
      <description>&lt;P&gt;Hello, I need to combine about ten tables all with different names (example: work.weight, work.diagnosis, work.dose) into one table with a variable that specifies their original table name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 19:12:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872348#M344646</guid>
      <dc:creator>jmmedina252</dc:creator>
      <dc:date>2023-04-26T19:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create Combined data set with variable based on original table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872349#M344647</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/439355"&gt;@jmmedina252&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello, I need to combine about ten tables all with different names (example: work.weight, work.diagnosis, work.dose) into one table with a variable that specifies their original table name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Could you define "combine"?? Do you want these tables to be combined horizontally, side by side? Or do you want these tables to be combined vertically, one on top of another? Or do you want something else?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 19:16:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872349#M344647</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-04-26T19:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create Combined data set with variable based on original table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872350#M344648</link>
      <description>&lt;P&gt;Are you stacking the data or merging the data (adding variables)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set weight diagnosis dose indsname=src;
source = src;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Merge (one option)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
merge weight (in=t1) diagnosis (in=t2) dose (in=t3);
by subjid;
src=catx('|', t1, t2, t3);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You likely need to provide more details to get an answer that's more specific to what you need.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 19:19:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872350#M344648</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-04-26T19:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create Combined data set with variable based on original table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872352#M344650</link>
      <description>stacked</description>
      <pubDate>Wed, 26 Apr 2023 19:25:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872352#M344650</guid>
      <dc:creator>jmmedina252</dc:creator>
      <dc:date>2023-04-26T19:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create Combined data set with variable based on original table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872353#M344651</link>
      <description>I would want to stack the data sets&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Apr 2023 19:25:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872353#M344651</guid>
      <dc:creator>jmmedina252</dc:creator>
      <dc:date>2023-04-26T19:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Create Combined data set with variable based on original table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872354#M344652</link>
      <description>Then try the first set of code I included.</description>
      <pubDate>Wed, 26 Apr 2023 19:32:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872354#M344652</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-04-26T19:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create Combined data set with variable based on original table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872355#M344653</link>
      <description>is there anyway to exclude the libname without saving the data sets to work? instead of source=data.dose I would want source=dose</description>
      <pubDate>Wed, 26 Apr 2023 19:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872355#M344653</guid>
      <dc:creator>jmmedina252</dc:creator>
      <dc:date>2023-04-26T19:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create Combined data set with variable based on original table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872357#M344655</link>
      <description>Use SCAN() to parse just the second portion. &lt;BR /&gt;&lt;BR /&gt;source =scan(src, 2, ".");</description>
      <pubDate>Wed, 26 Apr 2023 19:43:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Combined-data-set-with-variable-based-on-original-table/m-p/872357#M344655</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-04-26T19:43:25Z</dc:date>
    </item>
  </channel>
</rss>

