<?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: macros %if %then %else in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/macros-if-then-else/m-p/6098#M2445</link>
    <description>I don't see the reason to use a macro.  Why not just use one of these (it's not clear from your post whether you want a new dataset, a printout, or some other result)?&lt;BR /&gt;
&lt;BR /&gt;
proc print data=one noobs;&lt;BR /&gt;
	where sale &amp;gt;= 200;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
or &lt;BR /&gt;
&lt;BR /&gt;
data two;&lt;BR /&gt;
	set data one;&lt;BR /&gt;
	where sale &amp;gt;= 200;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
or &lt;BR /&gt;
&lt;BR /&gt;
data one;&lt;BR /&gt;
input id sale amt;&lt;BR /&gt;
if sale &amp;gt;= 200 then output;&lt;BR /&gt;
cards;&lt;BR /&gt;
101 150 4500&lt;BR /&gt;
102 200 5500&lt;BR /&gt;
103 210 6000&lt;BR /&gt;
;</description>
    <pubDate>Wed, 02 Jan 2008 21:05:01 GMT</pubDate>
    <dc:creator>1162</dc:creator>
    <dc:date>2008-01-02T21:05:01Z</dc:date>
    <item>
      <title>macros %if %then %else</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/macros-if-then-else/m-p/6097#M2444</link>
      <description>here data&lt;BR /&gt;
data one;&lt;BR /&gt;
input id sale amt;&lt;BR /&gt;
cards;&lt;BR /&gt;
101 150 4500&lt;BR /&gt;
102 200 5500&lt;BR /&gt;
103 210 6000&lt;BR /&gt;
;&lt;BR /&gt;
condition sale &amp;gt;=200&lt;BR /&gt;
by using macros &lt;BR /&gt;
i want output with code&lt;BR /&gt;
&lt;BR /&gt;
regards&lt;BR /&gt;
satya</description>
      <pubDate>Wed, 02 Jan 2008 15:26:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/macros-if-then-else/m-p/6097#M2444</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-01-02T15:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: macros %if %then %else</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/macros-if-then-else/m-p/6098#M2445</link>
      <description>I don't see the reason to use a macro.  Why not just use one of these (it's not clear from your post whether you want a new dataset, a printout, or some other result)?&lt;BR /&gt;
&lt;BR /&gt;
proc print data=one noobs;&lt;BR /&gt;
	where sale &amp;gt;= 200;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
or &lt;BR /&gt;
&lt;BR /&gt;
data two;&lt;BR /&gt;
	set data one;&lt;BR /&gt;
	where sale &amp;gt;= 200;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
or &lt;BR /&gt;
&lt;BR /&gt;
data one;&lt;BR /&gt;
input id sale amt;&lt;BR /&gt;
if sale &amp;gt;= 200 then output;&lt;BR /&gt;
cards;&lt;BR /&gt;
101 150 4500&lt;BR /&gt;
102 200 5500&lt;BR /&gt;
103 210 6000&lt;BR /&gt;
;</description>
      <pubDate>Wed, 02 Jan 2008 21:05:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/macros-if-then-else/m-p/6098#M2445</guid>
      <dc:creator>1162</dc:creator>
      <dc:date>2008-01-02T21:05:01Z</dc:date>
    </item>
  </channel>
</rss>

