<?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 error: Expecting an integer constant in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Macro-error-Expecting-an-integer-constant/m-p/570646#M11999</link>
    <description>&lt;P&gt;Hi there!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes I am able to run it outside of the Macro. Actually I found the error~ I missed a comma (stupid error). Nevertheless, thank you for your help!&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2019 16:54:03 GMT</pubDate>
    <dc:creator>CHELS</dc:creator>
    <dc:date>2019-07-02T16:54:03Z</dc:date>
    <item>
      <title>Macro error: Expecting an integer constant</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Macro-error-Expecting-an-integer-constant/m-p/570623#M11992</link>
      <description>&lt;P&gt;I have a macro for propensity score as follow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro prop_score (DatIn=, CatVar=, ConVar=, Outcome=, Event=, Iter=);&lt;/P&gt;&lt;P&gt;proc logistic data = &amp;amp;DatIn descending;&lt;BR /&gt;class &amp;amp;CatVar;&lt;BR /&gt;model &amp;amp;Outcome (event = "&amp;amp;Event") = &amp;amp;CatVar &amp;amp;ConVar /link=logit FIRTH Maxiter=&amp;amp;Iter ;&lt;BR /&gt;output out = ps_los pred = ps xbeta = logit_ps;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%mend prop_score;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to evoke the Macro with the following, it kept giving me &lt;STRONG&gt;ERROR 22-322: Expecting an integer constant &lt;/STRONG&gt;at the MAXITER option but I did specify an integer?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%prop_score (DatIn = Dat,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CatVar = %Str( A B C D) ,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ConVar = E,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Outcome = F,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Event = D,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Iter=15000);&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 16:14:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Macro-error-Expecting-an-integer-constant/m-p/570623#M11992</guid>
      <dc:creator>CHELS</dc:creator>
      <dc:date>2019-07-02T16:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error: Expecting an integer constant</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Macro-error-Expecting-an-integer-constant/m-p/570637#M11996</link>
      <description>Its hard to tell without more information, but it looks to me like the error isn't being produced by the MAXITER option. It seems like the error would be from somewhere around the "&amp;amp;Event" and &amp;amp;CatVar area. Are you actually using these macro values (E, F,D, %Str( A B C D), etc), or is this just dummy data that you plugged in for the post? I ask mainly because from every proc logistic step I've seen, the 'event=' is typically populated with a '1' or '0', and not a letter character. Additionally, I only typically see the section that follows that to have one value to explain what the '1' or '0' stands for. Where based on your logic it stands for "%Str( A B C D)". If that makes sense. Have you successfully run the code outside of the macro statement with values hard coded prior to building it into the macro statement?</description>
      <pubDate>Tue, 02 Jul 2019 16:43:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Macro-error-Expecting-an-integer-constant/m-p/570637#M11996</guid>
      <dc:creator>tsap</dc:creator>
      <dc:date>2019-07-02T16:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error: Expecting an integer constant</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Macro-error-Expecting-an-integer-constant/m-p/570646#M11999</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes I am able to run it outside of the Macro. Actually I found the error~ I missed a comma (stupid error). Nevertheless, thank you for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 16:54:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Macro-error-Expecting-an-integer-constant/m-p/570646#M11999</guid>
      <dc:creator>CHELS</dc:creator>
      <dc:date>2019-07-02T16:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Macro error: Expecting an integer constant</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Macro-error-Expecting-an-integer-constant/m-p/570667#M12003</link>
      <description>Please mark the question as solved to close this. In the future, please post your actual code and log, errors like that are easily found in the log.</description>
      <pubDate>Tue, 02 Jul 2019 17:40:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Macro-error-Expecting-an-integer-constant/m-p/570667#M12003</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-02T17:40:04Z</dc:date>
    </item>
  </channel>
</rss>

