<?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: &amp;quot;IN&amp;quot; indicator for join in Enterprise Guide in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682955#M206775</link>
    <description>Can you show an example of the query you're trying to generate?</description>
    <pubDate>Thu, 10 Sep 2020 15:05:46 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-09-10T15:05:46Z</dc:date>
    <item>
      <title>"IN" indicator for join in Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682951#M206774</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm looking for how to add the "IN" indicator to a file join in Enterprise Guide's GUI. I tried to go to Join Properties and add in=inmaster in the option box, but I get a syntax error when I try to run.&amp;nbsp; It says Invalid Option Name IN. This is easy in SAS Studio! Help please. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 14:58:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682951#M206774</guid>
      <dc:creator>njnagel1</dc:creator>
      <dc:date>2020-09-10T14:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: "IN" indicator for join in Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682955#M206775</link>
      <description>Can you show an example of the query you're trying to generate?</description>
      <pubDate>Thu, 10 Sep 2020 15:05:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682955#M206775</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-09-10T15:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: "IN" indicator for join in Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682958#M206777</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Sure! In SAS Studio, it would be&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Data merged;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;merge data1 (in=indata1) data2 (in=indata2);&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;by id;&lt;/SPAN&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;EG generates PROC SQL code that errors out (below)-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN&gt;PROC SQL NOEXEC;&lt;/SPAN&gt; &lt;SPAN&gt;SELECT t1.TRI2,&lt;/SPAN&gt; &lt;SPAN&gt;t1.TOTAL_PAID_AMT,&lt;/SPAN&gt; &lt;SPAN&gt;&amp;nbsp;t1.TOTAL_BILLED_AMT,&lt;/SPAN&gt; &lt;SPAN&gt;&amp;nbsp;t1.CLAIM_TYPE,&lt;/SPAN&gt; &lt;SPAN&gt;t2.REC_IND,&lt;/SPAN&gt; &lt;SPAN&gt;&amp;nbsp;t2.AMT_PAID,&lt;/SPAN&gt; &lt;SPAN&gt;&amp;nbsp;t2.AMT_BILLED&lt;/SPAN&gt; &lt;SPAN&gt;&amp;nbsp;FROM WORK.QUERY_FOR_SORTSORTED_0001(in=inmaster) t1&lt;/SPAN&gt; &lt;SPAN&gt;12 INNER JOIN WORK.QUERY_FOR_SORTSORTED_0002(in=inmrr) t2 ON (t1.TRI2 = t2.TRI2);&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN&gt;ERROR: Invalid option name IN.&lt;/SPAN&gt; &lt;SPAN&gt;ERROR: Some options for file WORK.QUERY_FOR_SORTSORTED_0001 were not processed because of errors or warnings noted above.&lt;/SPAN&gt; &lt;SPAN&gt;ERROR: Invalid option name IN.&lt;/SPAN&gt; &lt;SPAN&gt;ERROR: Some options for file WORK.QUERY_FOR_SORTSORTED_0002 were not processed because of errors or warnings noted above.&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN&gt;13 QUIT;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="mce-pastebin"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 10 Sep 2020 15:15:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682958#M206777</guid>
      <dc:creator>njnagel1</dc:creator>
      <dc:date>2020-09-10T15:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: "IN" indicator for join in Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682963#M206780</link>
      <description>IN isn't valid in SQL. It doesn't work in SAS Studio either, just tested it.&lt;BR /&gt;It's a data step option not a SQL step. What are you trying to do with that data? There are other ways to calculate it in SQL.&lt;BR /&gt;&lt;BR /&gt;Note for Valid IN = Data Step, SQL is not included. In comparison DROP is valid in data steps and Procs.&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/?docsetId=ledsoptsref&amp;amp;docsetTarget=n1p1o2dsuc465nn198ovwdrj9mvy.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://go.documentation.sas.com/?docsetId=ledsoptsref&amp;amp;docsetTarget=n1p1o2dsuc465nn198ovwdrj9mvy.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;</description>
      <pubDate>Thu, 10 Sep 2020 15:22:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682963#M206780</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-09-10T15:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: "IN" indicator for join in Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682973#M206787</link>
      <description>&lt;P&gt;There's alot on the web on the use of IN in SAS file merging. See two examples here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=n1i8w2bwu1fn5kn1gpxj18xttbb0.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n01jepaobjvwmyn1kd3bghrqo707" target="_blank"&gt;https://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=n1i8w2bwu1fn5kn1gpxj18xttbb0.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n01jepaobjvwmyn1kd3bghrqo707&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regardless, I'm matching two datasets and want to separate the results into those records that have a match in data1 (master) from those without a match. So I join and use the indicators of indata1=1 and indata2=1 VS indata1=1 and indata2=0 VS indata1=0 and indata2=1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your assistance!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 15:40:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682973#M206787</guid>
      <dc:creator>njnagel1</dc:creator>
      <dc:date>2020-09-10T15:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: "IN" indicator for join in Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682978#M206789</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/342958"&gt;@njnagel1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;There's alot on the web on the use of IN in SAS file merging. See two examples here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=n1i8w2bwu1fn5kn1gpxj18xttbb0.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n01jepaobjvwmyn1kd3bghrqo707" target="_blank" rel="noopener"&gt;https://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=n1i8w2bwu1fn5kn1gpxj18xttbb0.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n01jepaobjvwmyn1kd3bghrqo707&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regardless, I'm matching two datasets and want to separate the results into those records that have a match in data1 (master) from those without a match. So I join and use the indicators of indata1=1 and indata2=1 VS indata1=1 and indata2=0 VS indata1=0 and indata2=1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your assistance!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The link you use shows DATA STEP code, not Proc SQL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using SQL will require a few more steps and types of joins to achieve similar results. One thing is that SQL will AFAIK only allow a single table creation with a single SQL call.&amp;nbsp; If you want to use SQL you would be looking at EXCEPT operation and going both ways to do the equivalent of indata1=1 and indata2=0 VS indata1=0 and indata2=1. INNER JOIN does the in both.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 15:58:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682978#M206789</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-09-10T15:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: "IN" indicator for join in Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682981#M206792</link>
      <description>&lt;P&gt;Your code examples are DATA STEPs not PROCs.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IN works in data steps, it does not work in PROCs including PROC SQL.&lt;/P&gt;
&lt;P&gt;When joining data via SQL you control the merge primarily using the type of join, ie left/right/inner/outer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a short tutorial on SQL joins:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.listendata.com/2014/06/proc-sql-merging.html" target="_blank"&gt;https://www.listendata.com/2014/06/proc-sql-merging.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/342958"&gt;@njnagel1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;There's alot on the web on the use of IN in SAS file merging. See two examples here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=n1i8w2bwu1fn5kn1gpxj18xttbb0.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n01jepaobjvwmyn1kd3bghrqo707" target="_blank" rel="noopener"&gt;https://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=n1i8w2bwu1fn5kn1gpxj18xttbb0.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n01jepaobjvwmyn1kd3bghrqo707&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regardless, I'm matching two datasets and want to separate the results into those records that have a match in data1 (master) from those without a match. So I join and use the indicators of indata1=1 and indata2=1 VS indata1=1 and indata2=0 VS indata1=0 and indata2=1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your assistance!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 16:06:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682981#M206792</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-09-10T16:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: "IN" indicator for join in Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682986#M206795</link>
      <description>&lt;P&gt;I'm trying to accomplish this using the Enterprise Guide GUI, and it generates SQL code. I'll need to modify the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I'm guessing that there is not a way to specify the IN option in Enterprise Guide, besides modifying the SQL code...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 16:21:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682986#M206795</guid>
      <dc:creator>njnagel1</dc:creator>
      <dc:date>2020-09-10T16:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: "IN" indicator for join in Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682991#M206797</link>
      <description>&lt;P&gt;In EG, you either use the query builder, which creates SQL code, or write data step code in a program node. It is (as always, see Maxim 14) a question of the right tool for the issue at hand. Code you wrote in SAS Studio will also work in EG.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 16:26:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682991#M206797</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-09-10T16:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: "IN" indicator for join in Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682997#M206800</link>
      <description>&lt;P&gt;In SQL you use the join type INSTEAD of "in", different language = different methods.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 16:51:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-IN-quot-indicator-for-join-in-Enterprise-Guide/m-p/682997#M206800</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-09-10T16:51:02Z</dc:date>
    </item>
  </channel>
</rss>

