<?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: DI Studio Lookup Transformation - Not in Lookup Table in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Lookup-Transformation-Not-in-Lookup-Table/m-p/299513#M8485</link>
    <description>&lt;P&gt;An idea, do the Lookup, and use Extract in the next step to filter out missing keys.&lt;/P&gt;
&lt;P&gt;Again, how will you&amp;nbsp;use&amp;nbsp;entries without keys?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Sep 2016 11:29:01 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2016-09-20T11:29:01Z</dc:date>
    <item>
      <title>DI Studio Lookup Transformation - Not in Lookup Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Lookup-Transformation-Not-in-Lookup-Table/m-p/299487#M8482</link>
      <description>&lt;P&gt;The lookup transformation works lovely if you want to check if values are present in the Lookup table. But what if I want to check if a key is not present in the lookup table and keep these rows?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my example I have two lookup tables. I want my records of the source table to be present in one lookup table but absent absent in the other lookup table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &amp;nbsp;code to my transformation looks like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   set isdata.ISDV_AKT end = eof;
   
   /* Is the current key value stored in hash h0?  */ 
   rc0 = h0.check(key: bnr, 
   key: COMP);
   /* Is the current key value stored in hash h1?  */ 
   rc1 = h1.check(key: bnr, 
   key: COMP);
   /* Examine success of lookups  */ 
   if ( rc0=0 and rc1=0 ) then 
   do; 
      /* Write row to target  */ 
      output work.festgeworden; 
   end; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But I want the "Examine success of lookups" line to look like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  if ( rc0 = 0 and rc1 ^= 0 ) then &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is there an option to keep&amp;nbsp;the rows&amp;nbsp;if the check is negative (rc1 ^= 0) and skip those who were checked successfully?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or do I have to use user written code in this case?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 09:11:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Lookup-Transformation-Not-in-Lookup-Table/m-p/299487#M8482</guid>
      <dc:creator>Alkibiades</dc:creator>
      <dc:date>2016-09-20T09:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio Lookup Transformation - Not in Lookup Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Lookup-Transformation-Not-in-Lookup-Table/m-p/299490#M8483</link>
      <description>&lt;P&gt;I don't have DI Studio at my fingertips, but from the top of my head I don't think that Lookup can give you this.&lt;/P&gt;
&lt;P&gt;Perhaps you could use the Data Validation transform, or use Join with a NOT EXISTS/NOT IN() construct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is your goal to sort&amp;nbsp;keep&amp;nbsp;those records? Perhaps there's another way, depending on your objectives.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 09:25:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Lookup-Transformation-Not-in-Lookup-Table/m-p/299490#M8483</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-09-20T09:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio Lookup Transformation - Not in Lookup Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Lookup-Transformation-Not-in-Lookup-Table/m-p/299499#M8484</link>
      <description>I am used to juggle with hashes in Enterprise Guide. We just recently started to develop with the DI Studio so I am still struggling a bit with the boundaries of the Lookup transformation. I often work with exclusions via hash checks and tried to emulate the same functionaliyty).&lt;BR /&gt;The issue here is, we work with pairs of keys, but subquery (which would be my second choice in a proc sql) and the like only seem to work with one single key. So I tried to resort to Lookup transformations to achieve a lookup with multiple keys.</description>
      <pubDate>Tue, 20 Sep 2016 09:56:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Lookup-Transformation-Not-in-Lookup-Table/m-p/299499#M8484</guid>
      <dc:creator>Alkibiades</dc:creator>
      <dc:date>2016-09-20T09:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio Lookup Transformation - Not in Lookup Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Lookup-Transformation-Not-in-Lookup-Table/m-p/299513#M8485</link>
      <description>&lt;P&gt;An idea, do the Lookup, and use Extract in the next step to filter out missing keys.&lt;/P&gt;
&lt;P&gt;Again, how will you&amp;nbsp;use&amp;nbsp;entries without keys?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 11:29:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Lookup-Transformation-Not-in-Lookup-Table/m-p/299513#M8485</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-09-20T11:29:01Z</dc:date>
    </item>
  </channel>
</rss>

