<?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 If id of Table_A is in id of Table_b Then X in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/If-id-of-Table-A-is-in-id-of-Table-b-Then-X/m-p/187012#M14325</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm very new to SAS - switched jobs to a place that uses SAS enterprise - and have been doing readying a lot of SAS literature on forums and got some books already, but i can't seem to figure this out! Please help! essentially I need the equivalent of a Vlookup and all the syntax before and after the statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have Table_A (Table in SAS) and Table_B (external table in excel). Table_A has 150,000 rows, while Table_B has 10 rows. I'm trying to write an if-then clause that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF Table_A.column1 [has one of the variables in] Table_B.column1 THEN write 'TRUE' [in Table_B.column2]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that, I would probably sort and take NOT MISSING from Table_B.column2 to cut the table down to a more manageable size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies if this is too simple, but I can't find anything that works! Any suggestions of what PROC or what not would greatly be appreciated. Thanks, Larry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Sep 2014 22:32:31 GMT</pubDate>
    <dc:creator>zhou_larry</dc:creator>
    <dc:date>2014-09-04T22:32:31Z</dc:date>
    <item>
      <title>If id of Table_A is in id of Table_b Then X</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/If-id-of-Table-A-is-in-id-of-Table-b-Then-X/m-p/187012#M14325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm very new to SAS - switched jobs to a place that uses SAS enterprise - and have been doing readying a lot of SAS literature on forums and got some books already, but i can't seem to figure this out! Please help! essentially I need the equivalent of a Vlookup and all the syntax before and after the statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have Table_A (Table in SAS) and Table_B (external table in excel). Table_A has 150,000 rows, while Table_B has 10 rows. I'm trying to write an if-then clause that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF Table_A.column1 [has one of the variables in] Table_B.column1 THEN write 'TRUE' [in Table_B.column2]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that, I would probably sort and take NOT MISSING from Table_B.column2 to cut the table down to a more manageable size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies if this is too simple, but I can't find anything that works! Any suggestions of what PROC or what not would greatly be appreciated. Thanks, Larry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 22:32:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/If-id-of-Table-A-is-in-id-of-Table-b-Then-X/m-p/187012#M14325</guid>
      <dc:creator>zhou_larry</dc:creator>
      <dc:date>2014-09-04T22:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: If id of Table_A is in id of Table_b Then X</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/If-id-of-Table-A-is-in-id-of-Table-b-Then-X/m-p/187013#M14326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First step is to get TABLE_B into a SAS dataset.&amp;nbsp; If you need it back into EXCEL you can export it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would do it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; want ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&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; table_b (&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;=in1) table_a (&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;=in2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &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; COLUMN1 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&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; in1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp; COLUMN2 = in2 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;keep&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; column1 column2 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But note that it would make COLUMN2 as a numeric variable with of 0 (false) or 1 (true) rather than the text strings in your example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 23:32:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/If-id-of-Table-A-is-in-id-of-Table-b-Then-X/m-p/187013#M14326</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-09-04T23:32:24Z</dc:date>
    </item>
  </channel>
</rss>

