<?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: macro with if statement in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/macro-with-if-statement/m-p/801266#M40388</link>
    <description>&lt;P&gt;So you have a date variable in a dataset. Will this variable contain only a single distinct value in all observations, or different dates?&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2022 09:36:17 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-03-10T09:36:17Z</dc:date>
    <item>
      <title>macro with if statement</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/macro-with-if-statement/m-p/801264#M40387</link>
      <description>&lt;P&gt;How can i use macro with if, else, end statement, if i want to just start sql if the condition is true.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanna just use if statement, so if today()= date column from my table, and if this is true, then run this sql:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create table work.filtered_data AS&lt;BR /&gt;select *&lt;BR /&gt;from xxx&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 09:16:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/macro-with-if-statement/m-p/801264#M40387</guid>
      <dc:creator>Pato485</dc:creator>
      <dc:date>2022-03-10T09:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: macro with if statement</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/macro-with-if-statement/m-p/801266#M40388</link>
      <description>&lt;P&gt;So you have a date variable in a dataset. Will this variable contain only a single distinct value in all observations, or different dates?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 09:36:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/macro-with-if-statement/m-p/801266#M40388</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-10T09:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: macro with if statement</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/macro-with-if-statement/m-p/801270#M40389</link>
      <description>&lt;P&gt;just one, it is just one exact date in every month (but not same every month) when i need to start macro. But it is just one value in dataset everytime.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 09:57:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/macro-with-if-statement/m-p/801270#M40389</guid>
      <dc:creator>Pato485</dc:creator>
      <dc:date>2022-03-10T09:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: macro with if statement</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/macro-with-if-statement/m-p/801283#M40390</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    set have;
    if date=today() then call symputx('start',1);
    else call symputx('start',0);
run;
%if &amp;amp;start=1 %then %do;
    proc sql;
         ...
    quit;
%end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Works in SAS 9.4M5 and later.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 11:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/macro-with-if-statement/m-p/801283#M40390</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-10T11:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: macro with if statement</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/macro-with-if-statement/m-p/801306#M40394</link>
      <description>Thanks for solution.</description>
      <pubDate>Thu, 10 Mar 2022 13:05:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/macro-with-if-statement/m-p/801306#M40394</guid>
      <dc:creator>Pato485</dc:creator>
      <dc:date>2022-03-10T13:05:33Z</dc:date>
    </item>
  </channel>
</rss>

