<?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: Look up values in table instead of list in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Look-up-values-in-table-instead-of-list/m-p/207179#M38534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much Xia, it worked! Thanks all!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Aug 2015 15:38:39 GMT</pubDate>
    <dc:creator>Olaajay</dc:creator>
    <dc:date>2015-08-26T15:38:39Z</dc:date>
    <item>
      <title>Look up values in table instead of list</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Look-up-values-in-table-instead-of-list/m-p/207176#M38531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Please how do I re-write the code below:&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;&lt;BR /&gt;&lt;/STRONG&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; sample;&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: blue; background: white;"&gt;Set &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;new;&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; var in(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'1'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'2'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'3'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&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;DELETE&lt;/SPAN&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 style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;Run;&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; &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;So that, 1,2,3 is located in a table/permanent file and “var” is referencing a column in that table (ie I don’t want my code above to show 1,2,3 upfront). &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 21:10:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Look-up-values-in-table-instead-of-list/m-p/207176#M38531</guid>
      <dc:creator>Olaajay</dc:creator>
      <dc:date>2015-08-25T21:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Look up values in table instead of list</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Look-up-values-in-table-instead-of-list/m-p/207177#M38532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) Hash Table.&lt;/P&gt;&lt;P&gt;2) proc format&lt;/P&gt;&lt;P&gt;3) Array&lt;/P&gt;&lt;P&gt;4) SQL&lt;/P&gt;&lt;P&gt;5) IML code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a SQL code.&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table sample as&lt;/P&gt;&lt;P&gt;select * from new &lt;/P&gt;&lt;P&gt; where var not in ( select key from key_table );&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 12:52:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Look-up-values-in-table-instead-of-list/m-p/207177#M38532</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-08-26T12:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Look up values in table instead of list</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Look-up-values-in-table-instead-of-list/m-p/207178#M38533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS supports many versions of table look-up:&amp;nbsp; merging, formats, hash tables, SQL.&amp;nbsp; Somebody will have to correct my syntax here, since my SQL is weak.&amp;nbsp; But something alone these lines would do it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table sample as select * from new &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; /* some kind of union here with the other table to remove matches */&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorting and merging would be simple, but requires sorting first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 12:52:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Look-up-values-in-table-instead-of-list/m-p/207178#M38533</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-08-26T12:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Look up values in table instead of list</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Look-up-values-in-table-instead-of-list/m-p/207179#M38534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much Xia, it worked! Thanks all!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 15:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Look-up-values-in-table-instead-of-list/m-p/207179#M38534</guid>
      <dc:creator>Olaajay</dc:creator>
      <dc:date>2015-08-26T15:38:39Z</dc:date>
    </item>
  </channel>
</rss>

