<?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: How to factor the conditions with and or? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/342819#M78615</link>
    <description>&lt;P&gt;Looking at historical doc, cmiss was introduced in base SAS in version 9.2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In what context and with what version of SAS are you calling cmiss?&lt;/P&gt;</description>
    <pubDate>Tue, 21 Mar 2017 02:29:29 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2017-03-21T02:29:29Z</dc:date>
    <item>
      <title>How to factor the conditions with and or?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/341843#M78302</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data want;
	set have;
	where dTran &amp;gt;= '01JAN2017'd
		and dTran &amp;lt;= '31JAN2017'd 
		and cPOSMode in ('07') 
	    or (dTran &amp;gt;= '01JAN2017'd
	        and dTran &amp;lt;= '31JAN2017'd 
                and cPOSMode in ('90','02') 
	        and cToken is not null 
		and cPvder is not null 
		and idTReq is not null);
run;&lt;/PRE&gt;&lt;P&gt;Is it possible to simplify the conditions by factoring out the dates?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 03:04:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/341843#M78302</guid>
      <dc:creator>afiqcjohari</dc:creator>
      <dc:date>2017-03-17T03:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to factor the conditions with and or?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/341844#M78303</link>
      <description>&lt;P&gt;Logical algebra:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;A and B or A and C&lt;/EM&gt; is equivalent to &lt;EM&gt;A and (B or C)&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 03:14:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/341844#M78303</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-03-17T03:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to factor the conditions with and or?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/341851#M78308</link>
      <description>&lt;PRE&gt;data want;
	set have;
	where dTran &amp;gt;= '01JAN2017'd and dTran &amp;lt;= '31JAN2017'd 
		and (cPOSMode in ('07') 
		     or (cPOSMode in ('90','02') 
	             and cToken is not null 
		         and cPvder is not null 
		         and idTReq is not null));
run;&lt;/PRE&gt;&lt;P&gt;Hurm not sure whether it looks more readable.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 03:54:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/341851#M78308</guid>
      <dc:creator>afiqcjohari</dc:creator>
      <dc:date>2017-03-17T03:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to factor the conditions with and or?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/341853#M78310</link>
      <description>&lt;P&gt;Maybe&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
	set have;
	where dTran between '01JAN2017'd and '31JAN2017'd 
		and ( cPOSMode in ('07') 
		     or (cPOSMode in ('90','02') 
	             and cmiss(cToken, cPvder, idTReq) = 0) );
run;

/* Or */

data want;
	set have;
	where year(dTran) = 2017 
		and ( cPOSMode in ('07') 
		     or (cPOSMode in ('90','02') 
	             and cmiss(cToken, cPvder, idTReq) = 0) );
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Mar 2017 04:08:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/341853#M78310</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-03-17T04:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to factor the conditions with and or?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/341880#M78324</link>
      <description>That cmiss function does help! Thank you PG!</description>
      <pubDate>Fri, 17 Mar 2017 07:32:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/341880#M78324</guid>
      <dc:creator>afiqcjohari</dc:creator>
      <dc:date>2017-03-17T07:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to factor the conditions with and or?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/342810#M78609</link>
      <description>cmiss routine not found. Is it not part of SAS base or something?</description>
      <pubDate>Tue, 21 Mar 2017 02:04:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/342810#M78609</guid>
      <dc:creator>afiqcjohari</dc:creator>
      <dc:date>2017-03-21T02:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to factor the conditions with and or?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/342819#M78615</link>
      <description>&lt;P&gt;Looking at historical doc, cmiss was introduced in base SAS in version 9.2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In what context and with what version of SAS are you calling cmiss?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 02:29:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/342819#M78615</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-03-21T02:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to factor the conditions with and or?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/342848#M78626</link>
      <description>I just figured out that the server is running a 9.1 version while my desktop is on 9.3&lt;BR /&gt;&lt;BR /&gt;This explains why I can run the function previously.</description>
      <pubDate>Tue, 21 Mar 2017 06:15:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-factor-the-conditions-with-and-or/m-p/342848#M78626</guid>
      <dc:creator>afiqcjohari</dc:creator>
      <dc:date>2017-03-21T06:15:38Z</dc:date>
    </item>
  </channel>
</rss>

