<?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: Pull same variable observations from multiple datasets in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Pull-same-variable-observations-from-multiple-datasets/m-p/899378#M355500</link>
    <description>&lt;P&gt;Without much more information, sounds like a LEFT JOIN.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can post a small example of work.A, work.B, and work.C&amp;nbsp; (so DATA steps using CARDS statement to create each, maybe 5 rows of data, 3 variables) and then post the output you would want, along with the code you have tried, it will help people help you.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Oct 2023 13:19:55 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2023-10-20T13:19:55Z</dc:date>
    <item>
      <title>Pull same variable observations from multiple datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pull-same-variable-observations-from-multiple-datasets/m-p/899365#M355491</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 5 datasets (a,b,c,d,e) and all these 5 datasets has xyz variable with same datatype, please suggest in 1 query how can I pull observations (in 1 dataset) from xyz from all 5 datasets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From: Priyanka&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 12:20:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pull-same-variable-observations-from-multiple-datasets/m-p/899365#M355491</guid>
      <dc:creator>pdhokriya</dc:creator>
      <dc:date>2023-10-20T12:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Pull same variable observations from multiple datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pull-same-variable-observations-from-multiple-datasets/m-p/899372#M355496</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/55374"&gt;@pdhokriya&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 5 datasets (a,b,c,d,e) and all these 5 datasets has xyz variable with same datatype, please suggest in 1 query how can I pull observations (in 1 dataset) from xyz from all 5 datasets.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Given the wording above, it is not clear if you are trying to find when observations have the same value of XYZ in &lt;FONT color="#FF0000"&gt;all&lt;/FONT&gt; five data sets, or are you trying to find cases where a value in XYZ appears in more than one (but not all five) data sets, or even the situation where a value in XYZ appears in just one data set. Clarification would help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, do you want to combine these data sets horizontally (MERGE or JOIN) or vertically (SET or UNION)?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 12:48:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pull-same-variable-observations-from-multiple-datasets/m-p/899372#M355496</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-10-20T12:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Pull same variable observations from multiple datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pull-same-variable-observations-from-multiple-datasets/m-p/899378#M355500</link>
      <description>&lt;P&gt;Without much more information, sounds like a LEFT JOIN.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can post a small example of work.A, work.B, and work.C&amp;nbsp; (so DATA steps using CARDS statement to create each, maybe 5 rows of data, 3 variables) and then post the output you would want, along with the code you have tried, it will help people help you.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 13:19:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pull-same-variable-observations-from-multiple-datasets/m-p/899378#M355500</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-10-20T13:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Pull same variable observations from multiple datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pull-same-variable-observations-from-multiple-datasets/m-p/899392#M355504</link>
      <description>&lt;P&gt;Strongly suggest that you provide some small examples and what the result is supposed to look like.&lt;/P&gt;
&lt;P&gt;For example are any other variables to be included in the result? If they are have you verified the other variables that have the same name are of the same data type and length?&lt;/P&gt;
&lt;P&gt;Is there supposed to be any indication of which data set a specific value came from?&lt;/P&gt;
&lt;P&gt;How many values are involved? Do they need to change? (Goes to how to provide the list for selection, 2 or three are easy to place directly in code, 200 not so much).&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 14:26:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pull-same-variable-observations-from-multiple-datasets/m-p/899392#M355504</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-10-20T14:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Pull same variable observations from multiple datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pull-same-variable-observations-from-multiple-datasets/m-p/899397#M355506</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set a b c d e;
keep xyz;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I suspect this isn't quite what you want so you'll need to provide more information - fake examples of your situation are fine.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 14:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pull-same-variable-observations-from-multiple-datasets/m-p/899397#M355506</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-10-20T14:55:27Z</dc:date>
    </item>
  </channel>
</rss>

