<?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 resetting temporary variable in merge statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/resetting-temporary-variable-in-merge-statement/m-p/289332#M59754</link>
    <description>&lt;P&gt;What is the purpose of resetting temporary variables many1 and many2 in following code.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data pairs oddballs;
	many1=0;
	many2=0;
	merge many1 ( in = many1 )
		many2 ( in = many2 );
	by partkey;

	if many1 and many2 then
		output pairs;
	else output oddballs;
run;&lt;/PRE&gt;</description>
    <pubDate>Wed, 03 Aug 2016 18:55:17 GMT</pubDate>
    <dc:creator>SAS_inquisitive</dc:creator>
    <dc:date>2016-08-03T18:55:17Z</dc:date>
    <item>
      <title>resetting temporary variable in merge statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/resetting-temporary-variable-in-merge-statement/m-p/289332#M59754</link>
      <description>&lt;P&gt;What is the purpose of resetting temporary variables many1 and many2 in following code.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data pairs oddballs;
	many1=0;
	many2=0;
	merge many1 ( in = many1 )
		many2 ( in = many2 );
	by partkey;

	if many1 and many2 then
		output pairs;
	else output oddballs;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Aug 2016 18:55:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/resetting-temporary-variable-in-merge-statement/m-p/289332#M59754</guid>
      <dc:creator>SAS_inquisitive</dc:creator>
      <dc:date>2016-08-03T18:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: resetting temporary variable in merge statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/resetting-temporary-variable-in-merge-statement/m-p/289333#M59755</link>
      <description>&lt;P&gt;No practical purpose served that I can tell. If you found this code somewhere the assignments might be an artifact left in from previous code tested.&lt;/P&gt;
&lt;P&gt;Or someone misunderstanding how temporary variables work in SAS.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 19:03:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/resetting-temporary-variable-in-merge-statement/m-p/289333#M59755</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-08-03T19:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: resetting temporary variable in merge statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/resetting-temporary-variable-in-merge-statement/m-p/289339#M59756</link>
      <description>&lt;P&gt;This type of code is used for many-to-many matches.&amp;nbsp; For example, let's say:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;MANY1 contains 3 observations per PARTKEY&lt;/LI&gt;
&lt;LI&gt;MANY2 contains 5 observations per PARTKEY&lt;/LI&gt;
&lt;LI&gt;The objective is to output 3 observations per PARTKEY, matching the first from MANY1 with the first from MANY2, the second from MANY1 with the second from MANY2, etc.&amp;nbsp; Discard any that are left over from the data set containing more observations.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;That's what this program accomplishes ... matching based on whichever data set has fewer observations, and putting those matched observations into PAIRS.&amp;nbsp; Discarding any that are left over without a match, putting them into ODDBALLS.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 19:07:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/resetting-temporary-variable-in-merge-statement/m-p/289339#M59756</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-08-03T19:07:39Z</dc:date>
    </item>
  </channel>
</rss>

