<?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: if statement based on proc compare in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/if-statement-based-on-proc-compare/m-p/718212#M27574</link>
    <description>&lt;P&gt;Does this work if my code is a proc sql? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Feb 2021 12:36:55 GMT</pubDate>
    <dc:creator>mmea</dc:creator>
    <dc:date>2021-02-10T12:36:55Z</dc:date>
    <item>
      <title>if statement based on proc compare</title>
      <link>https://communities.sas.com/t5/New-SAS-User/if-statement-based-on-proc-compare/m-p/718208#M27572</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I have this proc compare, where I compare two sets for differences:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc compare 
 base = Set1
 compare = set2
	out= diff outdiff; 
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The out dataset diff - contains 4 variables: Type of observation = DIFF, observation number = 1, variable1 = 0, variable2 = 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need a if statment that says: If variable1 and variable 2 = 0, in other words there is no difference, then do the next line of code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know the set up will be something like that, but how can I specify the two variables from DIFF?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%if  ??? and   ???  %then %do ; 

**put code here;

%end;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Feb 2021 12:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/if-statement-based-on-proc-compare/m-p/718208#M27572</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2021-02-10T12:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on proc compare</title>
      <link>https://communities.sas.com/t5/New-SAS-User/if-statement-based-on-proc-compare/m-p/718210#M27573</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set diff;
   if variable1 = 0 and variable2 = 0 then do;
      /* Your Statement Here */
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Feb 2021 12:35:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/if-statement-based-on-proc-compare/m-p/718210#M27573</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-02-10T12:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on proc compare</title>
      <link>https://communities.sas.com/t5/New-SAS-User/if-statement-based-on-proc-compare/m-p/718212#M27574</link>
      <description>&lt;P&gt;Does this work if my code is a proc sql? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 12:36:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/if-statement-based-on-proc-compare/m-p/718212#M27574</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2021-02-10T12:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on proc compare</title>
      <link>https://communities.sas.com/t5/New-SAS-User/if-statement-based-on-proc-compare/m-p/718213#M27575</link>
      <description>&lt;P&gt;also I have and else do after the do statment &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the statment should DO the proc sql code when variables = 0 else&amp;nbsp;&lt;/P&gt;
&lt;P&gt;send out an email code&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 12:38:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/if-statement-based-on-proc-compare/m-p/718213#M27575</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2021-02-10T12:38:52Z</dc:date>
    </item>
  </channel>
</rss>

