<?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: Add a numeric suffix after matching of two lists in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Add-a-numeric-suffix-after-matching-of-two-lists/m-p/950200#M42709</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data db3_test;
  if 1=_N_ then
    do;
      declare hash h(dataset: "db2");
      h.defineKey('ID');
      h.defineDone();
    end;
  set db1;

  if h.check()=0 then id = cats(id,'999');
run;
proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 08 Nov 2024 09:44:10 GMT</pubDate>
    <dc:creator>yabwon</dc:creator>
    <dc:date>2024-11-08T09:44:10Z</dc:date>
    <item>
      <title>Add a numeric suffix after matching of two lists</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Add-a-numeric-suffix-after-matching-of-two-lists/m-p/950196#M42708</link>
      <description>&lt;P&gt;Hi guys,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;suppose to have the following dataset:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data DB1;
input ID :$20. ;
cards;
8
8
8 
170
170
170
166
166
166
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and a list:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data DB2;
input ID :$20. ;
cards;
8
170
152
166
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is there a way to match DB1 with DB2 and every time IDs of DB2 are found in DB1 a suffix "999" will be added?&lt;/P&gt;
&lt;P&gt;Desired output:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data DB3;
input ID :$20. ;
cards;
8999
8999
8999 
170999
170999
170999
166999
166999
166999
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you in advance.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 10:02:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Add-a-numeric-suffix-after-matching-of-two-lists/m-p/950196#M42708</guid>
      <dc:creator>NewUsrStat</dc:creator>
      <dc:date>2024-11-08T10:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Add a numeric suffix after matching of two lists</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Add-a-numeric-suffix-after-matching-of-two-lists/m-p/950200#M42709</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data db3_test;
  if 1=_N_ then
    do;
      declare hash h(dataset: "db2");
      h.defineKey('ID');
      h.defineDone();
    end;
  set db1;

  if h.check()=0 then id = cats(id,'999');
run;
proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Nov 2024 09:44:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Add-a-numeric-suffix-after-matching-of-two-lists/m-p/950200#M42709</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2024-11-08T09:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Add a numeric suffix after matching of two lists</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Add-a-numeric-suffix-after-matching-of-two-lists/m-p/950201#M42710</link>
      <description>&lt;P&gt;According to your description this:&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;170999
170999
170999&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;should not exist in DB3.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 09:45:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Add-a-numeric-suffix-after-matching-of-two-lists/m-p/950201#M42710</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2024-11-08T09:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Add a numeric suffix after matching of two lists</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Add-a-numeric-suffix-after-matching-of-two-lists/m-p/950202#M42711</link>
      <description>Sorry I edited. I made a mistake!</description>
      <pubDate>Fri, 08 Nov 2024 10:02:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Add-a-numeric-suffix-after-matching-of-two-lists/m-p/950202#M42711</guid>
      <dc:creator>NewUsrStat</dc:creator>
      <dc:date>2024-11-08T10:02:58Z</dc:date>
    </item>
  </channel>
</rss>

