<?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: help with merge/join to get only new ssid in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/help-with-merge-join-to-get-only-new-ssid/m-p/592191#M169767</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Paul D, It worked.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Sorry &lt;SPAN style="background-color: transparent; color: #333333; display: inline; float: none; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384"&gt;@Shmuel&lt;/a&gt;&lt;/SPAN&gt;, my specifications were not clear&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;I figured out the below code which worked as well.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;proc sql;&lt;BR /&gt;create table want as&lt;BR /&gt;select A.*, B.*&lt;BR /&gt;from T1 A left outer join T2 B&lt;BR /&gt;on A.SSID = B.old&lt;BR /&gt;or A.SSID = B.new;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;data want (drop= old new tmp);&lt;BR /&gt;set want;&lt;BR /&gt;if SSID=new then delete;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if old ^= . then do;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SSID=new;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; end;&lt;BR /&gt;run; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;cm3&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Sep 2019 15:08:01 GMT</pubDate>
    <dc:creator>cm3</dc:creator>
    <dc:date>2019-09-27T15:08:01Z</dc:date>
    <item>
      <title>help with merge/join to get only new ssid</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-merge-join-to-get-only-new-ssid/m-p/591950#M169673</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two datasets like below&lt;/P&gt;&lt;P&gt;&lt;SPAN class="kw6" style="background-color: transparent; color: #000080; font-family: monospace,monospace; font-size: 12.8px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; T1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kw3" style="background-color: transparent; color: #0000ff; font-family: monospace,monospace; font-size: 12.8px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;INPUT&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; ssid gender $ grade;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATALINES&amp;nbsp;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="nu0" style="background-color: transparent; color: #2e8b57; font-family: monospace,monospace; font-size: 12.8px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;100 M 08&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="nu0" style="background-color: transparent; color: #2e8b57; font-family: monospace,monospace; font-size: 12.8px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;101 M 08&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="nu0" style="background-color: transparent; color: #2e8b57; font-family: monospace,monospace; font-size: 12.8px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;200 F 08&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="nu0" style="background-color: transparent; color: #2e8b57; font-family: monospace,monospace; font-size: 12.8px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;300 F 08&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;400 M 08&lt;BR /&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kw6" style="background-color: transparent; color: #000080; font-family: monospace,monospace; font-size: 12.8px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;RUN&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="kw6" style="background-color: transparent; color: #000080; font-family: monospace,monospace; font-size: 12.8px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; T2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kw3" style="background-color: transparent; color: #0000ff; font-family: monospace,monospace; font-size: 12.8px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;INPUT&lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; old new tmp $;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATALINES&amp;nbsp;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="nu0" style="background-color: transparent; color: #2e8b57; font-family: monospace,monospace; font-size: 12.8px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;100 101 abc&lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="nu0" style="background-color: transparent; color: #2e8b57; font-family: monospace,monospace; font-size: 12.8px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;200 201 bcd&lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="nu0" style="background-color: transparent; color: #2e8b57; font-family: monospace,monospace; font-size: 12.8px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;400 401 def&lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kw6" style="background-color: transparent; color: #000080; font-family: monospace,monospace; font-size: 12.8px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;RUN&lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;I want to merge these two data sets to get the below output&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;ssid gender grade&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;101 M 08&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;201 F 08&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;300 F 08&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;401 M 08&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;appreciate your help on this code, without "WARNING: Variable already exists on file" in the log &lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;as my data is large&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: transparent; color: #000000; display: inline; float: none; font-family: monospace,monospace; font-size: 12.8px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 15.36px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2019 18:37:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-merge-join-to-get-only-new-ssid/m-p/591950#M169673</guid>
      <dc:creator>cm3</dc:creator>
      <dc:date>2019-09-26T18:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: help with merge/join to get only new ssid</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-merge-join-to-get-only-new-ssid/m-p/591960#M169677</link>
      <description>&lt;P&gt;Two methods: (1) using sql&amp;nbsp; (2) using merge datastep:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*1*/
proc sql;
  create table want as select *
  from t1  where
    ssid not in (select old from t2);
quit;

/*2 - assuming data are sorted */
data want;
  merge t1(in=in1)
        t2(in=in2  rename=(ols=ssid));
   by ssid;
        if in1 and not in2;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Sep 2019 18:47:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-merge-join-to-get-only-new-ssid/m-p/591960#M169677</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-09-26T18:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: help with merge/join to get only new ssid</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-merge-join-to-get-only-new-ssid/m-p/591979#M169686</link>
      <description>&lt;P&gt;Appreciate your quick response.&lt;/P&gt;&lt;P&gt;I can't use subquery option as I have another variable, old to new update which I did not mention in my example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And with the merge logic ,&amp;nbsp; new 201 and 401 records are missing in output data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2019 19:25:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-merge-join-to-get-only-new-ssid/m-p/591979#M169686</guid>
      <dc:creator>cm3</dc:creator>
      <dc:date>2019-09-26T19:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: help with merge/join to get only new ssid</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-merge-join-to-get-only-new-ssid/m-p/592021#M169700</link>
      <description>&lt;P&gt;Its not clear what table T2 represent and how to deal with.&lt;/P&gt;
&lt;P&gt;Where from do you get the 201, 401 records' attributes if they are not exist in T1 tabel ?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2019 20:48:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-merge-join-to-get-only-new-ssid/m-p/592021#M169700</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-09-26T20:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: help with merge/join to get only new ssid</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-merge-join-to-get-only-new-ssid/m-p/592083#M169726</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/93207"&gt;@cm3&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;If I understand your specs correctly, you want to update SSID in T1 to NEW from T2 if SSID=OLD but don't want duplicate records in the output. If so, the hash object is your friend:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data t1 ;                                                                                                                                                                                                                                                       
  input ssid gender $ grade ;                                                                                                                                                                                                                                   
  cards ;                                                                                                                                                                                                                                                       
100 m 08                                                                                                                                                                                                                                                        
101 m 08                                                                                                                                                                                                                                                        
200 f 08                                                                                                                                                                                                                                                        
300 f 08                                                                                                                                                                                                                                                        
400 m 08                                                                                                                                                                                                                                                        
;                                                                                                                                                                                                                                                               
run ;                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                
data t2 ;                                                                                                                                                                                                                                                       
  input old new tmp $ ;                                                                                                                                                                                                                                         
  cards ;                                                                                                                                                                                                                                                       
100 101 abc                                                                                                                                                                                                                                                     
200 201 bcd                                                                                                                                                                                                                                                     
400 401 def                                                                                                                                                                                                                                                     
;                                                                                                                                                                                                                                                               
run ;                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                
data want (keep = ssid gender grade) ;                                                                                                                                                                                                                          
  if _n_ = 1 then do ;                                                                                                                                                                                                                                          
    if 0 then set t2 ;                                                                                                                                                                                                                                          
    dcl hash h (dataset:"t2") ;                                                                                                                                                                                                                                 
    h.definekey ("old") ;                                                                                                                                                                                                                                       
    h.definedata ("new") ;                                                                                                                                                                                                                                      
    h.definedone () ;                                                                                                                                                                                                                                           
    dcl hash x () ;                                                                                                                                                                                                                                             
    x.definekey ("ssid", "gender", "grade") ;                                                                                                                                                                                                                   
    x.definedone () ;                                                                                                                                                                                                                                           
  end ;                                                                                                                                                                                                                                                         
  set t1 ;                                                                                                                                                                                                                                                      
  if h.find (key:ssid) = 0 then ssid = new ;                                                                                                                                                                                                                    
  if x.check() ne 0 ;                                                                                                                                                                                                                                           
  x.add() ;                                                                                                                                                                                                                                                     
run ;                                     
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The hash table H is used to effectuate the updates; the hash table X is used to exclude duplicates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;Paul D.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 04:52:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-merge-join-to-get-only-new-ssid/m-p/592083#M169726</guid>
      <dc:creator>hashman</dc:creator>
      <dc:date>2019-09-27T04:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: help with merge/join to get only new ssid</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-merge-join-to-get-only-new-ssid/m-p/592191#M169767</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Paul D, It worked.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Sorry &lt;SPAN style="background-color: transparent; color: #333333; display: inline; float: none; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384"&gt;@Shmuel&lt;/a&gt;&lt;/SPAN&gt;, my specifications were not clear&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;I figured out the below code which worked as well.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;proc sql;&lt;BR /&gt;create table want as&lt;BR /&gt;select A.*, B.*&lt;BR /&gt;from T1 A left outer join T2 B&lt;BR /&gt;on A.SSID = B.old&lt;BR /&gt;or A.SSID = B.new;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;data want (drop= old new tmp);&lt;BR /&gt;set want;&lt;BR /&gt;if SSID=new then delete;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if old ^= . then do;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SSID=new;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; end;&lt;BR /&gt;run; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 21.33px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;cm3&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 15:08:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-merge-join-to-get-only-new-ssid/m-p/592191#M169767</guid>
      <dc:creator>cm3</dc:creator>
      <dc:date>2019-09-27T15:08:01Z</dc:date>
    </item>
  </channel>
</rss>

