<?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: ERROR 388-185: Expecting an arithmetic operator. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-388-185-Expecting-an-arithmetic-operator/m-p/478084#M123237</link>
    <description>&lt;P&gt;You have a mismatch between how you define the macro and how you use it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For this definition:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%macro BaselCap(PD, LGD, EAD, corr);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;you would need to call it in this way:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%BaselCap(pd, 0.50, 1, 0.15)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you define it using equal signs instead:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%macro BaselCap(PD=, LGD=, EAD=, corr=);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;then you would need to call it with equal signs:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%BaselCap(PD=pd, LGD=0.50, EAD=1, corr=0.15)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that adding a semicolon at the end of a macro usually won't hurt anything, but isn't necessary.&lt;/P&gt;</description>
    <pubDate>Sat, 14 Jul 2018 02:07:16 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-07-14T02:07:16Z</dc:date>
    <item>
      <title>ERROR 388-185: Expecting an arithmetic operator.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-388-185-Expecting-an-arithmetic-operator/m-p/478081#M123235</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My below mentioned code runs into an error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro BaselCap(PD, LGD, EAD, corr);&lt;BR /&gt;temp1=((1/1-&amp;amp;corr))**0.5)*probit(&amp;amp;PD)+ ((&amp;amp;corr/1-&amp;amp;Corr))**0.5)*probit(0.999));&lt;BR /&gt;temp2=CDF('Normal',temp1);&lt;BR /&gt;Cap=&amp;amp;EAD*&amp;amp;LGD*(temp2-&amp;amp;PD);&lt;BR /&gt;%mend BaselCap;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data resmortgage;&lt;BR /&gt;do i=1 to 999;&lt;BR /&gt;PD=i/1000;&lt;BR /&gt;%BaselCap(PD, LGD=0.50, EAD=1, corr=0.15);&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please assist, Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jul 2018 01:15:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-388-185-Expecting-an-arithmetic-operator/m-p/478081#M123235</guid>
      <dc:creator>asifgeneral</dc:creator>
      <dc:date>2018-07-14T01:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 388-185: Expecting an arithmetic operator.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-388-185-Expecting-an-arithmetic-operator/m-p/478082#M123236</link>
      <description>&lt;P&gt;the problem is likely with this bit of code:&lt;/P&gt;&lt;P&gt;PD=i/1000;&lt;BR /&gt;%BaselCap(PD, LGD=0.50, EAD=1, corr=0.15);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;make pd a macro variable&lt;/P&gt;&lt;P&gt;%BaselCap(PD=&amp;amp;pd, LGD=0.50, EAD=1, corr=0.15);&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jul 2018 01:30:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-388-185-Expecting-an-arithmetic-operator/m-p/478082#M123236</guid>
      <dc:creator>pau13rown</dc:creator>
      <dc:date>2018-07-14T01:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 388-185: Expecting an arithmetic operator.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-388-185-Expecting-an-arithmetic-operator/m-p/478084#M123237</link>
      <description>&lt;P&gt;You have a mismatch between how you define the macro and how you use it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For this definition:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%macro BaselCap(PD, LGD, EAD, corr);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;you would need to call it in this way:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%BaselCap(pd, 0.50, 1, 0.15)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you define it using equal signs instead:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%macro BaselCap(PD=, LGD=, EAD=, corr=);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;then you would need to call it with equal signs:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%BaselCap(PD=pd, LGD=0.50, EAD=1, corr=0.15)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that adding a semicolon at the end of a macro usually won't hurt anything, but isn't necessary.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jul 2018 02:07:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-388-185-Expecting-an-arithmetic-operator/m-p/478084#M123237</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-07-14T02:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 388-185: Expecting an arithmetic operator.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-388-185-Expecting-an-arithmetic-operator/m-p/478087#M123238</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/217926"&gt;@asifgeneral&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;You've got your brackets "messed-up" and though the function encounters a closing bracket without a related opening bracket so at this place only an operator would be allowed..&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 509px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21780i5698E4966D0D7E03/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorting out the brackets "mess" and things work.&lt;/P&gt;
&lt;P&gt;I'm of course not sure if I've set the brackets in below code as you need it logically.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro BaselCap(PD, LGD, EAD, corr);
  temp1=( (1/(1-&amp;amp;corr))**0.5 *probit(&amp;amp;PD)+ ((&amp;amp;corr/1-&amp;amp;Corr))**0.5 *probit(0.999));
  temp2=CDF('Normal',temp1);
  Cap=&amp;amp;EAD*&amp;amp;LGD*(temp2-&amp;amp;PD);
%mend BaselCap;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jul 2018 02:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-388-185-Expecting-an-arithmetic-operator/m-p/478087#M123238</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-07-14T02:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 388-185: Expecting an arithmetic operator.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-388-185-Expecting-an-arithmetic-operator/m-p/482161#M124834</link>
      <description>thank you Patrick</description>
      <pubDate>Sat, 28 Jul 2018 10:17:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-388-185-Expecting-an-arithmetic-operator/m-p/482161#M124834</guid>
      <dc:creator>asifgeneral1</dc:creator>
      <dc:date>2018-07-28T10:17:04Z</dc:date>
    </item>
  </channel>
</rss>

