<?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: Requesting help with macro error in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Macro-not-working-and-several-errors/m-p/292522#M59938</link>
    <description>&lt;P&gt;You &amp;nbsp;need to post more of your log, specifically, how are you calling the macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Aug 2016 18:34:49 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-08-18T18:34:49Z</dc:date>
    <item>
      <title>Macro not working and several errors</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-not-working-and-several-errors/m-p/292513#M59936</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint;
 %MACRO V22I9ED1(AGE=, SEX=, ICD9= );

   IF &amp;amp;SEX= "2" AND &amp;amp;ICD9 IN ("2860", "2861")  THEN CC=" 48 "; 
   ELSe IF &amp;amp;AGE &amp;lt; 18 AND &amp;amp;ICD9 IN ("4910", "4911", "49120", "49121", "49122",
                              "4918", "4919", "4920", "4928", "496",  
                              "5181", "5182") THEN CC=" 112 ";
   ELSE IF &amp;amp;AGE &amp;lt; 18 AND &amp;amp;ICD9 IN ("49320", "49321", "49322") 
                                              THEN CC=" -1 ";

 
%IF &amp;amp;SEDITS = 1 %THEN %DO;
    
     _TAGE=PUT(&amp;amp;ICD9, $&amp;amp;AGEFMT9..);
     IF _TAGE NE "-1" AND
        (&amp;amp;AGE &amp;lt; INPUT(PUT(_TAGE, $AGEL.),8.) OR
         &amp;amp;AGE &amp;gt; INPUT(PUT(_TAGE, $AGEU.),8.)) THEN CC='-1';

    
     _TSEX=PUT(&amp;amp;ICD9, $&amp;amp;SEXFMT9..);
     IF _TSEX NE "-1"  &amp;amp; _TSEX NE &amp;amp;SEX THEN CC='-1';

  %END;
 %MEND V22I9ED1;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Error is attached below: Could somebody please help me with it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4640i13ED506F07FBFA2A/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 18:07:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-not-working-and-several-errors/m-p/292513#M59936</guid>
      <dc:creator>ashwini2</dc:creator>
      <dc:date>2016-08-18T18:07:36Z</dc:date>
    </item>
    <item>
      <title>Requesting help with macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-not-working-and-several-errors/m-p/292515#M59937</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint;
 %MACRO V22I9ED1(AGE=, SEX=, ICD9= );

   IF &amp;amp;SEX= "2" AND &amp;amp;ICD9 IN ("2860", "2861")  THEN CC=" 48 "; 
   ELSe IF &amp;amp;AGE &amp;lt; 18 AND &amp;amp;ICD9 IN ("4910", "4911", "49120", "49121", "49122",
                              "4918", "4919", "4920", "4928", "496",  
                              "5181", "5182") THEN CC=" 112 ";
   ELSE IF &amp;amp;AGE &amp;lt; 18 AND &amp;amp;ICD9 IN ("49320", "49321", "49322") 
                                              THEN CC=" -1 ";

 
%IF &amp;amp;SEDITS = 1 %THEN %DO;
    
     _TAGE=PUT(&amp;amp;ICD9, $&amp;amp;AGEFMT9..);
     IF _TAGE NE "-1" AND
        (&amp;amp;AGE &amp;lt; INPUT(PUT(_TAGE, $AGEL.),8.) OR
         &amp;amp;AGE &amp;gt; INPUT(PUT(_TAGE, $AGEU.),8.)) THEN CC='-1';

    
     _TSEX=PUT(&amp;amp;ICD9, $&amp;amp;SEXFMT9..);
     IF _TSEX NE "-1"  &amp;amp; _TSEX NE &amp;amp;SEX THEN CC='-1';

  %END;
 %MEND V22I9ED1;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Attached is the error message&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12855iBC750AB71D364044/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;</description>
      <pubDate>Thu, 18 Aug 2016 18:14:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-not-working-and-several-errors/m-p/292515#M59937</guid>
      <dc:creator>ashwini2</dc:creator>
      <dc:date>2016-08-18T18:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting help with macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-not-working-and-several-errors/m-p/292522#M59938</link>
      <description>&lt;P&gt;You &amp;nbsp;need to post more of your log, specifically, how are you calling the macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 18:34:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-not-working-and-several-errors/m-p/292522#M59938</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-18T18:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting help with macro error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-not-working-and-several-errors/m-p/292547#M59939</link>
      <description>&lt;P&gt;And run the code with OPTIONS MPRINT;&lt;/P&gt;
&lt;P&gt;Many times the displayed error message is way after the line of code with the issue and MPRINT helps with that plus showing the resolved values of the macro code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 19:53:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-not-working-and-several-errors/m-p/292547#M59939</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-08-18T19:53:27Z</dc:date>
    </item>
  </channel>
</rss>

