<?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: Apparent error in &amp;quot;%* Macro Comment Macro Statement&amp;quot; documentation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Apparent-error-in-quot-Macro-Comment-Macro-Statement-quot/m-p/722790#M224173</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;You are right.&lt;/P&gt;
&lt;P&gt;Click on the Feedback link on that documentation page and report the issue to the documentation team.&amp;nbsp; They are very happy to get constructive feedback like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Done.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Mar 2021 06:52:11 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2021-03-02T06:52:11Z</dc:date>
    <item>
      <title>Apparent error in "%* Macro Comment Macro Statement" documentation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Apparent-error-in-quot-Macro-Comment-Macro-Statement-quot/m-p/722779#M224168</link>
      <description>&lt;P&gt;This is not exactly a request for solutions, but an invitation for comments.&amp;nbsp; Maybe someone has brought this to SAS' attention already.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The discussion starting out the documentation for&amp;nbsp;&lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=mcrolref&amp;amp;docsetTarget=n17rxjs5x93mghn1mdxesvg78drx.htm&amp;amp;locale=en" target="_self"&gt;%* Macro Comment Macro Statement&lt;/A&gt;&amp;nbsp;is not being challenged here.&amp;nbsp; Instead I am focusing on an example in this section intended to show that an ordinary comment statement (beginning with * or with COMMENT) does NOT mask the comment content from the macro processor (hence the need for /* */ or %*).&amp;nbsp; It does show that property alright, but a little more pathologically than intended.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example is as follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro verdata(in, thresh);
    *%let thresh = 5;
    /* The preceding SAS comment does not hide the %let statement
        as does this type of SAS comment.
        %let thresh = 6;
    */
   %if %length(&amp;amp;in) &amp;gt; 0 %then %do;
         %* infile given;
      data check;
           /* Jim's data */
         infile &amp;amp;in;
         input x y z;
            * check data;
         if x&amp;lt;&amp;amp;thresh or y&amp;lt;&amp;amp;thresh or z&amp;lt;&amp;amp;thresh then list;
      run;
   %end;
   %else %put Error: No infile specified;
%mend verdata;
%verdata(ina, 0)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which the documentation asserts will produce this sas program:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA CHECK;
   INFILE INA;
   INPUT X Y Z;
      * CHECK DATA;
   IF X&amp;lt;5 OR Y&amp;lt;5 OR Z&amp;lt;5 THEN LIST;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Nope.&amp;nbsp; It actually produces this sas code:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* data check;
infile ina;
input x y z;
* check data;
if x&amp;lt;5 or y&amp;lt;5 or z&amp;lt;5 then list;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;... and a lot of error messages in the sas log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is ironic, since while successfully showing that the &lt;EM&gt;&lt;STRONG&gt;*%let thresh=5;&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;causes macro processor to ignore the asterisk and assign a value of 5 to thresh,&amp;nbsp;it also shows that the resulting &lt;EM&gt;&lt;STRONG&gt;%let&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;macro statement absorbs the semicolon, thereby converting the subsequent data statement into a comment (pesky little asterisk left untouched by macro).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The latter consequence was overlooked in the documentation.&amp;nbsp; I don't think the example was actually tested (also revealed by the fact that the purported resulting code is capitalized even though the source code inside the macro wasn't).&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 04:44:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Apparent-error-in-quot-Macro-Comment-Macro-Statement-quot/m-p/722779#M224168</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-03-02T04:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent error in "%* Macro Comment Macro Statement" documentation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Apparent-error-in-quot-Macro-Comment-Macro-Statement-quot/m-p/722782#M224170</link>
      <description>&lt;P&gt;You are right.&lt;/P&gt;
&lt;P&gt;Click on the Feedback link on that documentation page and report the issue to the documentation team.&amp;nbsp; They are very happy to get constructive feedback like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 05:09:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Apparent-error-in-quot-Macro-Comment-Macro-Statement-quot/m-p/722782#M224170</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-03-02T05:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent error in "%* Macro Comment Macro Statement" documentation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Apparent-error-in-quot-Macro-Comment-Macro-Statement-quot/m-p/722790#M224173</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;You are right.&lt;/P&gt;
&lt;P&gt;Click on the Feedback link on that documentation page and report the issue to the documentation team.&amp;nbsp; They are very happy to get constructive feedback like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Done.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 06:52:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Apparent-error-in-quot-Macro-Comment-Macro-Statement-quot/m-p/722790#M224173</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-03-02T06:52:11Z</dc:date>
    </item>
  </channel>
</rss>

