<?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: How to use POWER/POW function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-POWER-POW-function/m-p/724077#M224779</link>
    <description>&lt;P&gt;I m trying to calculate below value, I thought Power can be sued.&lt;/P&gt;&lt;P&gt;Is there any other way to calculate below value?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Age)^0.02&lt;/P&gt;</description>
    <pubDate>Fri, 05 Mar 2021 22:43:59 GMT</pubDate>
    <dc:creator>Lav001</dc:creator>
    <dc:date>2021-03-05T22:43:59Z</dc:date>
    <item>
      <title>How to use POWER/POW function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-POWER-POW-function/m-p/724068#M224775</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I tried to use power function in&amp;nbsp;SAS EG 7.1 Version with below code, it is throwing below error:&lt;/P&gt;&lt;P&gt;Also, tried to use with CAPS/NOCAPS system option &lt;A href="https://support.sas.com/kb/62/620.html" target="_blank"&gt;https://support.sas.com/kb/62/620.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test:&lt;BR /&gt;y=power(2,2);&lt;BR /&gt;z=power(2,2);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;error 68-185 the function power is unknown or cannot be accessed&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you suggest on resolving above error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 22:09:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-POWER-POW-function/m-p/724068#M224775</guid>
      <dc:creator>Lav001</dc:creator>
      <dc:date>2021-03-05T22:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use POWER/POW function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-POWER-POW-function/m-p/724071#M224776</link>
      <description>&lt;P&gt;What is the "power" function supposed to do? It sounds like you are trying to use the syntax from a different programming language.&lt;/P&gt;
&lt;P&gt;The error is pretty clear: SAS does not supply a function named power.&lt;/P&gt;
&lt;P&gt;If someone in your organization has written such using Proc Fcmp then it has not been set up for you to use.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 22:27:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-POWER-POW-function/m-p/724071#M224776</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-05T22:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to use POWER/POW function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-POWER-POW-function/m-p/724077#M224779</link>
      <description>&lt;P&gt;I m trying to calculate below value, I thought Power can be sued.&lt;/P&gt;&lt;P&gt;Is there any other way to calculate below value?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Age)^0.02&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 22:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-POWER-POW-function/m-p/724077#M224779</guid>
      <dc:creator>Lav001</dc:creator>
      <dc:date>2021-03-05T22:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use POWER/POW function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-POWER-POW-function/m-p/724086#M224786</link>
      <description>&lt;P&gt;In SAS you would use the ** (yes 2 asterisks) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3**2 is 9&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3**0.5 would be the square root of 3 though there is a SQRT function specifically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The ^ character is a logical "not" operator. I suspect you tried 2^2 and got a message like:&lt;/P&gt;
&lt;PRE&gt;263  data junk;
264     x = 3 ^2;
               -
               22
               76
ERROR 22-322: Syntax error, expecting one of the following: &amp;lt;, &amp;lt;=, =, &amp;gt;, &amp;gt;=, EQ, GE, GT, LE, LT,
              NE, NG, NL, ^=, ~=.

ERROR 76-322: Syntax error, statement will be ignored.

265  run;
&lt;/PRE&gt;
&lt;P&gt;Left as an exercise for the interested reader why&lt;/P&gt;
&lt;P&gt;x = ^2;&lt;/P&gt;
&lt;P&gt;does not throw an error. Hint: use different values like 0, 1, 2 and 3 and check the results.&lt;/P&gt;
&lt;P&gt;Remember SAS only has two variable types, numeric and character and that might help.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 23:06:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-POWER-POW-function/m-p/724086#M224786</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-05T23:06:21Z</dc:date>
    </item>
  </channel>
</rss>

