<?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: Automatic macro variables as local in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variables-as-local/m-p/33482#M6553</link>
    <description>Hmmm. You are correct. I will have to find it as the person who asked me this claimed that it was listed on the doc site as an automatic macro variable. But I just ran the same check you did and also checked dictionary tables and neither of these are automatic.&lt;BR /&gt;
&lt;BR /&gt;
Thx!</description>
    <pubDate>Fri, 18 Mar 2011 21:00:22 GMT</pubDate>
    <dc:creator>DonH</dc:creator>
    <dc:date>2011-03-18T21:00:22Z</dc:date>
    <item>
      <title>Automatic macro variables as local</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variables-as-local/m-p/33480#M6551</link>
      <description>Based on some testing I just did in 9.2, it appears that some automatic macro variable can be declared to be local inside a macro. I tested sqlrc and SQL obs. Does anyone know of a comprehensive list of which automatics variables can be local?</description>
      <pubDate>Fri, 18 Mar 2011 20:25:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variables-as-local/m-p/33480#M6551</guid>
      <dc:creator>DonH</dc:creator>
      <dc:date>2011-03-18T20:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic macro variables as local</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variables-as-local/m-p/33481#M6552</link>
      <description>I don't think they are _AUTOMATIC_.  They are not printed by %put _AUTOMATIC_;&lt;BR /&gt;
&lt;BR /&gt;
Since they are not created until the procedure executes, your comment would imply they follow the same rule as any other macro variable, with regards to scope.</description>
      <pubDate>Fri, 18 Mar 2011 20:48:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variables-as-local/m-p/33481#M6552</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-03-18T20:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic macro variables as local</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variables-as-local/m-p/33482#M6553</link>
      <description>Hmmm. You are correct. I will have to find it as the person who asked me this claimed that it was listed on the doc site as an automatic macro variable. But I just ran the same check you did and also checked dictionary tables and neither of these are automatic.&lt;BR /&gt;
&lt;BR /&gt;
Thx!</description>
      <pubDate>Fri, 18 Mar 2011 21:00:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variables-as-local/m-p/33482#M6553</guid>
      <dc:creator>DonH</dc:creator>
      <dc:date>2011-03-18T21:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic macro variables as local</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variables-as-local/m-p/33483#M6554</link>
      <description>This note describes the behavior and calls them automatic. So I guess they are. &lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/4/736.html" target="_blank"&gt;http://support.sas.com/kb/4/736.html&lt;/A&gt;</description>
      <pubDate>Sat, 19 Mar 2011 01:59:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variables-as-local/m-p/33483#M6554</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-03-19T01:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic macro variables as local</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variables-as-local/m-p/33484#M6555</link>
      <description>my "guess" is that any automatic macro variable to which you can assign a value, could be named on a %LOCAL&lt;BR /&gt;
&amp;amp;syslast is an example I tried&lt;BR /&gt;
438  %let syslast = something ;&lt;BR /&gt;
439  %macro check1( name) ;&lt;BR /&gt;
440  %local syslast ;&lt;BR /&gt;
441  %let syslast = nothing ;&lt;BR /&gt;
442   %put _local_ ;&lt;BR /&gt;
443   %put &amp;amp;name = &amp;amp;&amp;amp;&amp;amp;name ;&lt;BR /&gt;
444  %mend ;&lt;BR /&gt;
445  %check1(syslast) ;&lt;BR /&gt;
ERROR: Attempt to %LOCAL automatic macro variable SYSLAST.&lt;BR /&gt;
CHECK1 NAME syslast&lt;BR /&gt;
syslast = WORK.nothing&lt;BR /&gt;
446  %put &amp;amp;syslast ;&lt;BR /&gt;
WORK.nothing&lt;BR /&gt;
 &lt;BR /&gt;
So, that ERROR indicates a rule.&lt;BR /&gt;
(which almosts demands an exception)&lt;BR /&gt;
  &lt;BR /&gt;
peterC</description>
      <pubDate>Sat, 19 Mar 2011 10:29:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variables-as-local/m-p/33484#M6555</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-03-19T10:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic macro variables as local</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variables-as-local/m-p/33485#M6556</link>
      <description>Automatic macro variables are created by the macro processor when you invoke SAS.  All of them are global except for SYSPBUFF which is local.  But, you won't see it listed with a "%put _local_" because that only lists user-generated local macro variables.&lt;BR /&gt;
&lt;BR /&gt;
Of the automatic macro variables that can be assigned values, they still remain global no matter where you assign the new value...</description>
      <pubDate>Thu, 02 Jun 2011 16:23:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatic-macro-variables-as-local/m-p/33485#M6556</guid>
      <dc:creator>PatrickG</dc:creator>
      <dc:date>2011-06-02T16:23:29Z</dc:date>
    </item>
  </channel>
</rss>

