<?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 what's wrong with this macro? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/what-s-wrong-with-this-macro/m-p/47999#M9926</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test(alpha,beta);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%if &amp;amp;alpha eq and &amp;amp;beta eq %then %do;&lt;/P&gt;&lt;P&gt;%let alpha=0.005;&lt;/P&gt;&lt;P&gt;%let beta=0.005;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%if &amp;amp;alpha ne and &amp;amp;beta eq&amp;nbsp; %then %do;&lt;/P&gt;&lt;P&gt;%let beta=&amp;amp;alpha;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;alpha &amp;amp;beta;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%test()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Mar 2012 04:17:19 GMT</pubDate>
    <dc:creator>Linlin</dc:creator>
    <dc:date>2012-03-29T04:17:19Z</dc:date>
    <item>
      <title>what's wrong with this macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-s-wrong-with-this-macro/m-p/47998#M9925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wrote one macro as below. This macro includes two parameters. If either of them is blank, the values of the two maco variable will be specified in the macro...........But when i run %test, error will appear.....How to fix it? Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test(alpha,beta);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; %if &amp;amp;alpha eq and &amp;amp;beta eq %then %do;&lt;/P&gt;&lt;P&gt;%let &amp;amp;alpha=0.005;&lt;/P&gt;&lt;P&gt;%let &amp;amp;beta=0.005;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; %if &amp;amp;alpha ne and &amp;amp;beta eq&amp;nbsp; %then %do;&lt;/P&gt;&lt;P&gt;%let &amp;amp;beta=&amp;amp;alpha;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;alpha &amp;amp;beta;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%test()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 03:38:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-s-wrong-with-this-macro/m-p/47998#M9925</guid>
      <dc:creator>MikeTurner</dc:creator>
      <dc:date>2012-03-29T03:38:41Z</dc:date>
    </item>
    <item>
      <title>what's wrong with this macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-s-wrong-with-this-macro/m-p/47999#M9926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test(alpha,beta);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%if &amp;amp;alpha eq and &amp;amp;beta eq %then %do;&lt;/P&gt;&lt;P&gt;%let alpha=0.005;&lt;/P&gt;&lt;P&gt;%let beta=0.005;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%if &amp;amp;alpha ne and &amp;amp;beta eq&amp;nbsp; %then %do;&lt;/P&gt;&lt;P&gt;%let beta=&amp;amp;alpha;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;alpha &amp;amp;beta;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%test()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 04:17:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-s-wrong-with-this-macro/m-p/47999#M9926</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-03-29T04:17:19Z</dc:date>
    </item>
    <item>
      <title>what's wrong with this macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-s-wrong-with-this-macro/m-p/48000#M9927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; The Problem is in statement &lt;/P&gt;&lt;P&gt;%let &amp;amp;beta=&amp;amp;alpha;&lt;/P&gt;&lt;P&gt;your are assigning the value of alpha to value of beta.the correct statement should be &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let beta=&amp;amp;alpha;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where you assign the value of alpha to macro variable beta.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 10:01:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-s-wrong-with-this-macro/m-p/48000#M9927</guid>
      <dc:creator>manojinpec</dc:creator>
      <dc:date>2012-03-29T10:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: what's wrong with this macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-s-wrong-with-this-macro/m-p/48001#M9928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a hole in your logic.&amp;nbsp; What should the value of BETA be when only ALPHA is specified?&lt;/P&gt;&lt;P&gt;Assuming you want it to be 0.005 then the logic simplifies to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;%if &amp;amp;beta&amp;nbsp; = %then %let beta=0.005;&lt;/P&gt;&lt;P&gt;%if &amp;amp;alpha = %then %let alpha=&amp;amp;beta;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 13:47:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-s-wrong-with-this-macro/m-p/48001#M9928</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-03-29T13:47:45Z</dc:date>
    </item>
  </channel>
</rss>

