<?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: Merging and missing variables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Merging-and-missing-variables/m-p/141206#M37683</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is your code missing some BY's or is that just a copy/paste error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;SORT&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;=ALL &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;OUT&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;=SOURCE &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;NODUPKEY&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;DUPOUT&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;=XX; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; REGIONID LOCATIONID USERID ;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;SORT&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;=REFERENCETAB &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;NODUPKEY&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;OUT&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;=ID ; &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;BY&lt;/STRONG&gt;&lt;/SPAN&gt; REGIONID LOCATIONID USERID;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; YFYS YFNS NFYS;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;MERGE&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; SOURCE(&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;=a) ID(&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;=b); &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;BY&lt;/STRONG&gt;&lt;/SPAN&gt; REGIONID LOCATIONID USERID; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; A AND B &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;THEN&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;OUTPUT&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; YFYS;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; A=&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: teal; background-color: white;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; AND B=&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: teal; background-color: white;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;THEN&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;OUTPUT&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; YFNS; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; A=&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: teal; background-color: white;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; AND B=&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: teal; background-color: white;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;THEN&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;OUTPUT&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; NFYS; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jan 2015 23:31:55 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-01-27T23:31:55Z</dc:date>
    <item>
      <title>Merging and missing variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merging-and-missing-variables/m-p/141205#M37682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to merge two large datasets but having difficulty retaining all the variables.&amp;nbsp; This has typically been my ‘go to’ method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;SORT&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=ALL &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;OUT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=SOURCE &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;NODUPKEY&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;DUPOUT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=XX; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; REGIONID LOCATIONID USERID ;&lt;/SPAN&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;SORT&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=REFERENCETAB &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;NODUPKEY&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;OUT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=ID ; BY REGIONID LOCATIONID USERID;&lt;/SPAN&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; YFYS YFNS NFYS;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;MERGE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; SOURCE(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=a) ID(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=b); BY REGIONID LOCATIONID USERID; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; A AND B &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;THEN&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;OUTPUT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; YFYS;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; A=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; AND B=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;THEN&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;OUTPUT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; YFNS; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; A=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; AND B=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;THEN&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;OUTPUT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; NFYS; &lt;/SPAN&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am retaining A=B and A=1 and B=0. However, I am missing some variables from my ‘Source’ dataset after the merge.&amp;nbsp; I cant understand why? &lt;/P&gt;&lt;P&gt;I’ve also used Pro SQL for merging, but I need to control for record counts and am a bit uneasy with this method.&amp;nbsp; Can someone give me some insight?&amp;nbsp; Thank young&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 23:22:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merging-and-missing-variables/m-p/141205#M37682</guid>
      <dc:creator>SannaSanna</dc:creator>
      <dc:date>2015-01-27T23:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Merging and missing variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merging-and-missing-variables/m-p/141206#M37683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is your code missing some BY's or is that just a copy/paste error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;SORT&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;=ALL &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;OUT&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;=SOURCE &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;NODUPKEY&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;DUPOUT&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;=XX; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; REGIONID LOCATIONID USERID ;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;SORT&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;=REFERENCETAB &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;NODUPKEY&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;OUT&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;=ID ; &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;BY&lt;/STRONG&gt;&lt;/SPAN&gt; REGIONID LOCATIONID USERID;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; YFYS YFNS NFYS;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;MERGE&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; SOURCE(&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;=a) ID(&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;=b); &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;BY&lt;/STRONG&gt;&lt;/SPAN&gt; REGIONID LOCATIONID USERID; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; A AND B &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;THEN&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;OUTPUT&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; YFYS;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; A=&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: teal; background-color: white;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; AND B=&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: teal; background-color: white;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;THEN&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;OUTPUT&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; YFNS; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; A=&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: teal; background-color: white;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; AND B=&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: teal; background-color: white;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;THEN&lt;/SPAN&gt; &lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;OUTPUT&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; NFYS; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 23:31:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merging-and-missing-variables/m-p/141206#M37683</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-01-27T23:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Merging and missing variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merging-and-missing-variables/m-p/141207#M37684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.&amp;nbsp; There was a 'BY'&amp;nbsp; it was a copy and paste error.&amp;nbsp; Also the variables in each dataset should be unique so there should not be any over-written data.&amp;nbsp; Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 23:48:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merging-and-missing-variables/m-p/141207#M37684</guid>
      <dc:creator>SannaSanna</dc:creator>
      <dc:date>2015-01-27T23:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Merging and missing variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merging-and-missing-variables/m-p/141208#M37685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide more details, preferably a proc contents on your input datasets for the merge and the proc contents from the output that is missing variables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see anything wrong in your code at first glance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 23:55:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merging-and-missing-variables/m-p/141208#M37685</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-01-27T23:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Merging and missing variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merging-and-missing-variables/m-p/141209#M37686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually missing the variables or some variables missing values? The NODUPKEY may not be selecting the record you want/expect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 00:28:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merging-and-missing-variables/m-p/141209#M37686</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-01-28T00:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Merging and missing variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merging-and-missing-variables/m-p/141210#M37687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&amp;nbsp; I removed nodupkey and ran separately and it seemed to have worked.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 02:30:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merging-and-missing-variables/m-p/141210#M37687</guid>
      <dc:creator>SannaSanna</dc:creator>
      <dc:date>2015-01-28T02:30:48Z</dc:date>
    </item>
  </channel>
</rss>

