<?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 Issues with %Mend in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-Issues-with-Mend/m-p/72232#M15569</link>
    <description>For this line,&lt;BR /&gt;
&lt;BR /&gt;
estimate p = 1 outest = autoclus'&amp;amp;clust' ;&lt;BR /&gt;
&lt;BR /&gt;
you need to use double-quotes (") to get it to resolve to &lt;BR /&gt;
&lt;BR /&gt;
estimate p = 1 outest = autoclus1;</description>
    <pubDate>Tue, 30 Mar 2010 01:52:13 GMT</pubDate>
    <dc:creator>Doc_Duke</dc:creator>
    <dc:date>2010-03-30T01:52:13Z</dc:date>
    <item>
      <title>Macro Issues with %Mend</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Issues-with-Mend/m-p/72230#M15567</link>
      <description>Hey Guys,&lt;BR /&gt;
   I'm consistently getting the following error: Macro keyword MEND appears as text.  A semicolon or other delimiter may be missing.&lt;BR /&gt;
&lt;BR /&gt;
I can get the macro to run by submitting the following string a few times:&lt;BR /&gt;
&lt;BR /&gt;
 *'; *"; *); */; %mend; run;&lt;BR /&gt;
&lt;BR /&gt;
although once the macro has compiled, it produces a recursive reference error for the variable CLUST.  IF someone would be willing to look at my code and let me know what they think is going wrong that would be great!&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
  Ashton&lt;BR /&gt;
&lt;BR /&gt;
%macro clusfinal (data = , clust=) ;&lt;BR /&gt;
data clusdat1;&lt;BR /&gt;
set &amp;amp;data;&lt;BR /&gt;
if cluster ne &amp;amp;clust then mean1 = "."; run;&lt;BR /&gt;
proc arima data = clusdat1;&lt;BR /&gt;
identify var = mean1 (1);&lt;BR /&gt;
run;&lt;BR /&gt;
estimate p = 1 outest = autoclus'&amp;amp;clust' ;&lt;BR /&gt;
RUN;&lt;BR /&gt;
proc print data = autoclus;&lt;BR /&gt;
run;&lt;BR /&gt;
%mend;&lt;BR /&gt;
&lt;BR /&gt;
%clusfinal (data = clusdata, clust =1);</description>
      <pubDate>Mon, 29 Mar 2010 19:49:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Issues-with-Mend/m-p/72230#M15567</guid>
      <dc:creator>devizeskayak</dc:creator>
      <dc:date>2010-03-29T19:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Issues with %Mend</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Issues-with-Mend/m-p/72231#M15568</link>
      <description>You need to share your SAS code execution (and compilation) as part of a complete SAS log, not just the code-piece you might think is related.  Ensure that all code (including macros and macro variables) are revealed - such as using:&lt;BR /&gt;
&lt;BR /&gt;
OPTIONS SOURCE SOURCE2 MACROGEN SYMBOLGEN MLOGIC MPRINT;&lt;BR /&gt;
&lt;BR /&gt;
In fact, this additional level of diagnostics may help you with desk-checking the code execution for culprit like open comment or missing semi-colon.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 29 Mar 2010 20:37:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Issues-with-Mend/m-p/72231#M15568</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-29T20:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Issues with %Mend</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Issues-with-Mend/m-p/72232#M15569</link>
      <description>For this line,&lt;BR /&gt;
&lt;BR /&gt;
estimate p = 1 outest = autoclus'&amp;amp;clust' ;&lt;BR /&gt;
&lt;BR /&gt;
you need to use double-quotes (") to get it to resolve to &lt;BR /&gt;
&lt;BR /&gt;
estimate p = 1 outest = autoclus1;</description>
      <pubDate>Tue, 30 Mar 2010 01:52:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Issues-with-Mend/m-p/72232#M15569</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-03-30T01:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Issues with %Mend</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Issues-with-Mend/m-p/72233#M15570</link>
      <description>Thanks guys! got it resolved with the change from single quotes to doubles.  Appreciate the help.&lt;BR /&gt;
&lt;BR /&gt;
-A</description>
      <pubDate>Tue, 30 Mar 2010 13:39:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Issues-with-Mend/m-p/72233#M15570</guid>
      <dc:creator>devizeskayak</dc:creator>
      <dc:date>2010-03-30T13:39:21Z</dc:date>
    </item>
  </channel>
</rss>

