<?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: Help with macro error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-with-macro-error/m-p/961844#M374945</link>
    <description>&lt;P&gt;Please, please, &lt;STRONG&gt;PLEASE&lt;/STRONG&gt; paste log and code entries as text in text boxes opened on the forum with the &amp;lt;/&amp;gt; icon that appears above the main message windows.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is quite often much easier to COPY - Edit - Paste suggested fixes to code. The more stuff that requires typing from scratch the less likely you are to get complete working code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When debugging MACRO generated code then set OPTIONS MPRINT; before running the macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, you have placed the value of the Type variable in the WHERE statement inside single quotes. Macro variables inside single quotes do not resolve at all. You must use double quotes&lt;/P&gt;
&lt;PRE&gt;where type = "&amp;amp;type";&lt;/PRE&gt;</description>
    <pubDate>Fri, 14 Mar 2025 05:21:54 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2025-03-14T05:21:54Z</dc:date>
    <item>
      <title>Help with macro error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-macro-error/m-p/961837#M374944</link>
      <description>&lt;P&gt;When I run a proc arima it works fine. See log below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sasgorilla_0-1741919563734.png" style="width: 680px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105416iFEE05B0CD443D4F2/image-dimensions/680x210?v=v2" width="680" height="210" role="button" title="sasgorilla_0-1741919563734.png" alt="sasgorilla_0-1741919563734.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run as a macro, it doesn't. I can't figure out why...&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the macro:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sasgorilla_1-1741919636126.png" style="width: 664px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105417i8C7787DE8BA87212/image-dimensions/664x166?v=v2" width="664" height="166" role="button" title="sasgorilla_1-1741919636126.png" alt="sasgorilla_1-1741919636126.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here is the error when I run the macro.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sasgorilla_2-1741919797789.png" style="width: 748px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105418i142CEA7AC956351D/image-dimensions/748x172?v=v2" width="748" height="172" role="button" title="sasgorilla_2-1741919797789.png" alt="sasgorilla_2-1741919797789.png" /&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;Any ideas why this is happening?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 02:39:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-macro-error/m-p/961837#M374944</guid>
      <dc:creator>sasgorilla</dc:creator>
      <dc:date>2025-03-14T02:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help with macro error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-macro-error/m-p/961844#M374945</link>
      <description>&lt;P&gt;Please, please, &lt;STRONG&gt;PLEASE&lt;/STRONG&gt; paste log and code entries as text in text boxes opened on the forum with the &amp;lt;/&amp;gt; icon that appears above the main message windows.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is quite often much easier to COPY - Edit - Paste suggested fixes to code. The more stuff that requires typing from scratch the less likely you are to get complete working code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When debugging MACRO generated code then set OPTIONS MPRINT; before running the macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, you have placed the value of the Type variable in the WHERE statement inside single quotes. Macro variables inside single quotes do not resolve at all. You must use double quotes&lt;/P&gt;
&lt;PRE&gt;where type = "&amp;amp;type";&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Mar 2025 05:21:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-macro-error/m-p/961844#M374945</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2025-03-14T05:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help with macro error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-macro-error/m-p/961846#M374946</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And sorry about the images! I was working in an external environment without online access and where I could not copy and paste the code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 05:39:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-macro-error/m-p/961846#M374946</guid>
      <dc:creator>sasgorilla</dc:creator>
      <dc:date>2025-03-14T05:39:27Z</dc:date>
    </item>
  </channel>
</rss>

