<?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: Data ...; merge dataset1 (in=a) dataset2 (in=b) ... in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-merge-dataset1-in-a-dataset2-in-b/m-p/408151#M99549</link>
    <description>&lt;P&gt;in= variable creates a binary variable that tells you if that input data set contributes to this observation.&amp;nbsp; Correct--if you don't use them, there is no point in making them.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;The IF statement is a subsetting IF.&amp;nbsp; If the variable is true (1 in this case) processing is continued and the observation is output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code is keeping all observations that come at least in part from the eligibility_2 data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Oct 2017 19:57:49 GMT</pubDate>
    <dc:creator>WarrenKuhfeld</dc:creator>
    <dc:date>2017-10-27T19:57:49Z</dc:date>
    <item>
      <title>Data ...; merge dataset1 (in=a) dataset2 (in=b) ...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-merge-dataset1-in-a-dataset2-in-b/m-p/408146#M99546</link>
      <description>&lt;P&gt;I'm trying to understand the following code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data final_eligibilityfile (drop=dtstart);
		merge eligibility_2 (in=a) status (in=b) county (in=c) ;
		by PID starting ending;
		if a;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Two questions:&amp;nbsp;&lt;/P&gt;&lt;P&gt;- What is the purpose of (in=b) and (in=c) if we don't reference b or c later on in the code (?) (as far as I'm aware)&lt;/P&gt;&lt;P&gt;- What does the "if a" mean? Does&amp;nbsp;that mean if a given variable is in a (e.g. "eligibility_2")?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 19:47:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-merge-dataset1-in-a-dataset2-in-b/m-p/408146#M99546</guid>
      <dc:creator>cdubs</dc:creator>
      <dc:date>2017-10-27T19:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Data ...; merge dataset1 (in=a) dataset2 (in=b) ...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-merge-dataset1-in-a-dataset2-in-b/m-p/408151#M99549</link>
      <description>&lt;P&gt;in= variable creates a binary variable that tells you if that input data set contributes to this observation.&amp;nbsp; Correct--if you don't use them, there is no point in making them.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;The IF statement is a subsetting IF.&amp;nbsp; If the variable is true (1 in this case) processing is continued and the observation is output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code is keeping all observations that come at least in part from the eligibility_2 data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 19:57:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-merge-dataset1-in-a-dataset2-in-b/m-p/408151#M99549</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-10-27T19:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Data ...; merge dataset1 (in=a) dataset2 (in=b) ...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-merge-dataset1-in-a-dataset2-in-b/m-p/408183#M99568</link>
      <description>&lt;H1 id="n1p1o2dsuc465nn198ovwdrj9mvy" class="xis-title"&gt;IN= Data Set Option&lt;/H1&gt;
&lt;P class="xis-shortDescription"&gt;Creates a Boolean variable that indicates whether the data set contributed data to the current observation.&lt;/P&gt;
&lt;P class="xis-shortDescription"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xis-shortDescription"&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/ledsoptsref/69751/HTML/default/viewer.htm#n1p1o2dsuc465nn198ovwdrj9mvy.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/ledsoptsref/69751/HTML/default/viewer.htm#n1p1o2dsuc465nn198ovwdrj9mvy.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 21:47:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-merge-dataset1-in-a-dataset2-in-b/m-p/408183#M99568</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-27T21:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Data ...; merge dataset1 (in=a) dataset2 (in=b) ...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-merge-dataset1-in-a-dataset2-in-b/m-p/408196#M99578</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/174079"&gt;@cdubs&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I'm trying to understand the following code:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data final_eligibilityfile (drop=dtstart);
		merge eligibility_2 (in=a) status (in=b) county (in=c) ;
		by PID starting ending;
		if a;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Two questions:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- What is the purpose of (in=b) and (in=c) if we don't reference b or c later on in the code (?) (as far as I'm aware)&lt;/P&gt;
&lt;P&gt;- What does the "if a" mean? Does&amp;nbsp;that mean if a given variable is in a (e.g. "eligibility_2")?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps you should investigate the free online courses and tutorials at &lt;A href="https://support.sas.com/edu/elearning.html?ctry=us&amp;amp;productType=library" target="_blank"&gt;https://support.sas.com/edu/elearning.html?ctry=us&amp;amp;productType=library&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 23:15:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-merge-dataset1-in-a-dataset2-in-b/m-p/408196#M99578</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-10-27T23:15:18Z</dc:date>
    </item>
  </channel>
</rss>

