<?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 Combining SAS logical operators in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Combining-SAS-logical-operators/m-p/89572#M19001</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone&lt;/P&gt;&lt;P&gt;When I run the below data step and see the result, I am not getting any records where there is a 'y' flag and there definitely should be (no errors either). When I run some of these operators individually, I do get 'y' flags. Is there some syntax issue with combining operators?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data s0All (keep=cnty_name County place Year start stop exit filing_cat1 agecat4 Jur2012 Jur2011 Jur2010);&lt;/P&gt;&lt;P&gt;set workep;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (exit="ZTC" and start &amp;lt; 01/02/2012) or (stop &amp;lt; 01/02/2012) then Jur2012="y"; &lt;/P&gt;&lt;P&gt;else Jur2012="n";&lt;/P&gt;&lt;P&gt;if (exit="ZTC" and start &amp;lt; 01/02/2011) or (stop &amp;lt; 01/02/2011 and start &amp;lt; 01/02/2011) then Jur2011="y"; &lt;/P&gt;&lt;P&gt;else Jur2011="n";&lt;/P&gt;&lt;P&gt;if (exit="ZTC" and start &amp;lt; 01/02/2010) or (stop &amp;lt; 01/02/2010 and start &amp;lt; 01/02/2010) then Jur2010="y"; &lt;/P&gt;&lt;P&gt;else Jur2010="n";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jan 2013 16:45:19 GMT</pubDate>
    <dc:creator>Paul_NYS</dc:creator>
    <dc:date>2013-01-29T16:45:19Z</dc:date>
    <item>
      <title>Combining SAS logical operators</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combining-SAS-logical-operators/m-p/89572#M19001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone&lt;/P&gt;&lt;P&gt;When I run the below data step and see the result, I am not getting any records where there is a 'y' flag and there definitely should be (no errors either). When I run some of these operators individually, I do get 'y' flags. Is there some syntax issue with combining operators?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data s0All (keep=cnty_name County place Year start stop exit filing_cat1 agecat4 Jur2012 Jur2011 Jur2010);&lt;/P&gt;&lt;P&gt;set workep;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (exit="ZTC" and start &amp;lt; 01/02/2012) or (stop &amp;lt; 01/02/2012) then Jur2012="y"; &lt;/P&gt;&lt;P&gt;else Jur2012="n";&lt;/P&gt;&lt;P&gt;if (exit="ZTC" and start &amp;lt; 01/02/2011) or (stop &amp;lt; 01/02/2011 and start &amp;lt; 01/02/2011) then Jur2011="y"; &lt;/P&gt;&lt;P&gt;else Jur2011="n";&lt;/P&gt;&lt;P&gt;if (exit="ZTC" and start &amp;lt; 01/02/2010) or (stop &amp;lt; 01/02/2010 and start &amp;lt; 01/02/2010) then Jur2010="y"; &lt;/P&gt;&lt;P&gt;else Jur2010="n";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 16:45:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combining-SAS-logical-operators/m-p/89572#M19001</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2013-01-29T16:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Combining SAS logical operators</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combining-SAS-logical-operators/m-p/89573#M19002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is your start variable a character or a number? Is it formatted as a date?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think your date part is wrong anyways, should be start&amp;lt;'01Jan2010'd type notation rather than what you have.&lt;/P&gt;&lt;P&gt;You may also want to verify the case of your 'y' to make sure none are 'Y' or "N".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 16:55:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combining-SAS-logical-operators/m-p/89573#M19002</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-01-29T16:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Combining SAS logical operators</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combining-SAS-logical-operators/m-p/89574#M19003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza, It is a number (01/01/2003), formatted as a date field. However, your suggestion above resolved it. I don't totally understand because it was evaluating it prior. Regardless, thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 17:29:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combining-SAS-logical-operators/m-p/89574#M19003</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2013-01-29T17:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Combining SAS logical operators</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combining-SAS-logical-operators/m-p/89575#M19004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The difference is this.&amp;nbsp; How would you feel about making this comparison:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if start &amp;lt; 0.5 / 2012 then do;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's actually the comparison you were making.&amp;nbsp; 01/02/2012 says divide 1 by 2, then divide the result by 2012.&amp;nbsp; Reeza showed you the right way to refer to a particular day on the SAS date scale.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 17:36:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combining-SAS-logical-operators/m-p/89575#M19004</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-01-29T17:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Combining SAS logical operators</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combining-SAS-logical-operators/m-p/89576#M19005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Astounding. I see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 18:43:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combining-SAS-logical-operators/m-p/89576#M19005</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2013-01-29T18:43:33Z</dc:date>
    </item>
  </channel>
</rss>

