<?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 for multiple conditions in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/if-for-multiple-conditions/m-p/532360#M145875</link>
    <description>&lt;P&gt;Ok. There is a number of things wring with your code. First and foremost, your inequality signs are in the wring direction. No date value can be smaller than 01jan2010 &lt;STRONG&gt;and&amp;nbsp;&lt;/STRONG&gt;larger than 31dec2015...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have written this template from the sashelp.stocks data set. Should give you what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
   set sashelp.stocks;
   prevalence = (('01jan1998'd &amp;lt;= date &amp;lt;= '31dec2000'd) and (stock='IBM'));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 03 Feb 2019 08:21:49 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-02-03T08:21:49Z</dc:date>
    <item>
      <title>if for multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-for-multiple-conditions/m-p/532357#M145872</link>
      <description>&lt;P&gt;that&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i wrote the above syntax but that doesnt cut it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help&lt;/P&gt;&lt;P&gt;thanx&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 08:39:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-for-multiple-conditions/m-p/532357#M145872</guid>
      <dc:creator>dr_101</dc:creator>
      <dc:date>2019-02-04T08:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: if for multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-for-multiple-conditions/m-p/532358#M145873</link>
      <description>&lt;P&gt;So, you want &lt;STRONG&gt;prevalance&lt;/STRONG&gt; to be a dummy variable, correct? Do you get errors in the log?&lt;/P&gt;</description>
      <pubDate>Sun, 03 Feb 2019 08:00:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-for-multiple-conditions/m-p/532358#M145873</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-02-03T08:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: if for multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-for-multiple-conditions/m-p/532360#M145875</link>
      <description>&lt;P&gt;Ok. There is a number of things wring with your code. First and foremost, your inequality signs are in the wring direction. No date value can be smaller than 01jan2010 &lt;STRONG&gt;and&amp;nbsp;&lt;/STRONG&gt;larger than 31dec2015...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have written this template from the sashelp.stocks data set. Should give you what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
   set sashelp.stocks;
   prevalence = (('01jan1998'd &amp;lt;= date &amp;lt;= '31dec2000'd) and (stock='IBM'));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 03 Feb 2019 08:21:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-for-multiple-conditions/m-p/532360#M145875</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-02-03T08:21:49Z</dc:date>
    </item>
  </channel>
</rss>

