<?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 After putting two data set together using set, how do i create a column knowing which data variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/After-putting-two-data-set-together-using-set-how-do-i-create-a/m-p/740300#M231222</link>
    <description>&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;DATA tablea;&lt;/P&gt;&lt;P&gt;color="blue"&lt;/P&gt;&lt;P&gt;name="mike"&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA tableb;&lt;/P&gt;&lt;P&gt;color="pink"&lt;/P&gt;&lt;P&gt;name="sara"&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA two_data;&lt;/P&gt;&lt;P&gt;set work.tablea&lt;/P&gt;&lt;P&gt;work.tableb;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I create a column/variable showing which row belongs to tablea or tableb?&lt;/P&gt;</description>
    <pubDate>Mon, 10 May 2021 21:13:16 GMT</pubDate>
    <dc:creator>kmin87</dc:creator>
    <dc:date>2021-05-10T21:13:16Z</dc:date>
    <item>
      <title>After putting two data set together using set, how do i create a column knowing which data variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/After-putting-two-data-set-together-using-set-how-do-i-create-a/m-p/740300#M231222</link>
      <description>&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;DATA tablea;&lt;/P&gt;&lt;P&gt;color="blue"&lt;/P&gt;&lt;P&gt;name="mike"&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA tableb;&lt;/P&gt;&lt;P&gt;color="pink"&lt;/P&gt;&lt;P&gt;name="sara"&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA two_data;&lt;/P&gt;&lt;P&gt;set work.tablea&lt;/P&gt;&lt;P&gt;work.tableb;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I create a column/variable showing which row belongs to tablea or tableb?&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 21:13:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/After-putting-two-data-set-together-using-set-how-do-i-create-a/m-p/740300#M231222</guid>
      <dc:creator>kmin87</dc:creator>
      <dc:date>2021-05-10T21:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: After putting two data set together using set, how do i create a column knowing which data varia</title>
      <link>https://communities.sas.com/t5/SAS-Programming/After-putting-two-data-set-together-using-set-how-do-i-create-a/m-p/740307#M231227</link>
      <description>&lt;P&gt;The SET statement INDSNAME option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;DATA two_data;
   set work.tablea
        work.tableb
        indsname=tempvar
   ;
   source=tempvar;
run;

 &lt;/PRE&gt;
&lt;P&gt;INDSNAME assigns the name of the source data set to a temporary variable. If you want that in the output set you need to assign it to another variable as above.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 21:20:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/After-putting-two-data-set-together-using-set-how-do-i-create-a/m-p/740307#M231227</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-05-10T21:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: After putting two data set together using set, how do i create a column knowing which data varia</title>
      <link>https://communities.sas.com/t5/SAS-Programming/After-putting-two-data-set-together-using-set-how-do-i-create-a/m-p/740309#M231229</link>
      <description>&lt;P&gt;When I export it to excel, the source column is blank. how do i show it on excel?&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 21:28:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/After-putting-two-data-set-together-using-set-how-do-i-create-a/m-p/740309#M231229</guid>
      <dc:creator>kmin87</dc:creator>
      <dc:date>2021-05-10T21:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: After putting two data set together using set, how do i create a column knowing which data varia</title>
      <link>https://communities.sas.com/t5/SAS-Programming/After-putting-two-data-set-together-using-set-how-do-i-create-a/m-p/740313#M231233</link>
      <description>&lt;P&gt;Show the LOG of the code you ran to combine the data set and "export to Excel".&lt;/P&gt;
&lt;P&gt;Go to the log, copy the text, on the forum open a text window with the &amp;lt;/&amp;gt; icon at the top of the message window and then paste the text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that depending on how you "export" you may not have replaced an older version.&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 21:41:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/After-putting-two-data-set-together-using-set-how-do-i-create-a/m-p/740313#M231233</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-05-10T21:41:52Z</dc:date>
    </item>
  </channel>
</rss>

