<?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: Dataset Where Command with a Resitrction in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dataset-Where-Command-with-a-Resitrction/m-p/683077#M206835</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where (month(fltdate) ne &amp;amp;month_now or &amp;amp;month_now = 9) and status_code="I";&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 10 Sep 2020 21:01:53 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-09-10T21:01:53Z</dc:date>
    <item>
      <title>Dataset Where Command with a Resitrction</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dataset-Where-Command-with-a-Resitrction/m-p/683073#M206831</link>
      <description>&lt;P&gt;I have the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data egtask.ovrfy_ind_curr_t1;
	set ibs.overfy&amp;amp;cfyear;
	where month(fltdate)&amp;lt;&amp;gt;&amp;amp;month_now and status_code="I";
	MarketSubmarket = Market * 10 + SubMarket;
	Month = month(fltdate);
run;&lt;/PRE&gt;&lt;P&gt;Now this works perfectly, except that I do not want the restriction:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;where month(fltdate)&amp;lt;&amp;gt;&amp;amp;month_now&lt;/PRE&gt;&lt;P&gt;to be run in the month of September. So if the month the dataset is run is 9, then the where statement should be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;where status_code="I";&lt;/PRE&gt;&lt;P&gt;and all other months it should be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;where month(fltdate)&amp;lt;&amp;gt;&amp;amp;month_now and status_code="I";&lt;/PRE&gt;&lt;P&gt;I do have a global macro variable called month_now, but I am not sure it can be used. Is something like this possible..a conditional where?&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 20:48:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dataset-Where-Command-with-a-Resitrction/m-p/683073#M206831</guid>
      <dc:creator>BCNAV</dc:creator>
      <dc:date>2020-09-10T20:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dataset Where Command with a Resitrction</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dataset-Where-Command-with-a-Resitrction/m-p/683077#M206835</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where (month(fltdate) ne &amp;amp;month_now or &amp;amp;month_now = 9) and status_code="I";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Sep 2020 21:01:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dataset-Where-Command-with-a-Resitrction/m-p/683077#M206835</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-09-10T21:01:53Z</dc:date>
    </item>
  </channel>
</rss>

