<?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: Difference between %LOCAL and %GLOBAL? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/536702#M147527</link>
    <description>&lt;P&gt;Incorrect.&amp;nbsp; local or global indicates the scope of the macro variable.&amp;nbsp; You can create global macros within a macro for instance.&amp;nbsp; The default for macro variables created within a macro is local to the macro, however you can explicitly state the macro variable is global, and hence make it available outside.&amp;nbsp; As that doesn't really work with encapsulation, so default is local.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is clear guidance in the documentation about this:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#p1b76sxg9dbcyrn1l5age5j5nvgw.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#p1b76sxg9dbcyrn1l5age5j5nvgw.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Feb 2019 12:09:48 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2019-02-19T12:09:48Z</dc:date>
    <item>
      <title>Difference between %LOCAL and %GLOBAL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/534802#M146803</link>
      <description>&lt;P&gt;&lt;STRONG&gt;What is the difference between %LOCAL and %GLOBAL?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 12:36:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/534802#M146803</guid>
      <dc:creator>sandeep12</dc:creator>
      <dc:date>2019-02-12T12:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between %LOCAL and %GLOBAL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/534807#M146805</link>
      <description>&lt;P&gt;Copy/paste the exact words below into a Google search:&lt;/P&gt;
&lt;P&gt;sas What is the difference between %LOCAL and %GLOBAL&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 12:52:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/534807#M146805</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-02-12T12:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between %LOCAL and %GLOBAL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/534809#M146806</link>
      <description>&lt;P&gt;Also search for macro variable&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;scope&lt;/STRONG&gt;&lt;/U&gt;&lt;U&gt;.&lt;/U&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 12:55:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/534809#M146806</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-02-12T12:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between %LOCAL and %GLOBAL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/534810#M146807</link>
      <description>&lt;P&gt;Maxim 1: Read the Documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The documentation for macro statements is &lt;A href="http://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=mcrolref&amp;amp;docsetTarget=p15uzqjm8zbainn1w0sfhg32eujc.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 12:57:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/534810#M146807</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-12T12:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between %LOCAL and %GLOBAL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/534900#M146835</link>
      <description>&lt;P&gt;They both are used to make sure macro variables are defined. The difference is where they are defined. %GLOBAL will define them in the global symbol table.&amp;nbsp; %LOCAL will define them in the symbol table for the currently running macro.&amp;nbsp; Once the current macro finishes running its symbol table disappears.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 16:14:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/534900#M146835</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-02-12T16:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between %LOCAL and %GLOBAL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/536701#M147526</link>
      <description>&lt;P&gt;&lt;SPAN&gt;% Local is a &lt;A href="https://data-flair.training/blogs/sas-macro/" target="_self"&gt;macro&lt;/A&gt; variable defined inside a macro. %Global is a macro variable defined in open code (outside the macro or can use anywhere).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 12:00:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/536701#M147526</guid>
      <dc:creator>rinugour</dc:creator>
      <dc:date>2019-02-19T12:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between %LOCAL and %GLOBAL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/536702#M147527</link>
      <description>&lt;P&gt;Incorrect.&amp;nbsp; local or global indicates the scope of the macro variable.&amp;nbsp; You can create global macros within a macro for instance.&amp;nbsp; The default for macro variables created within a macro is local to the macro, however you can explicitly state the macro variable is global, and hence make it available outside.&amp;nbsp; As that doesn't really work with encapsulation, so default is local.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is clear guidance in the documentation about this:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#p1b76sxg9dbcyrn1l5age5j5nvgw.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#p1b76sxg9dbcyrn1l5age5j5nvgw.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 12:09:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-LOCAL-and-GLOBAL/m-p/536702#M147527</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-02-19T12:09:48Z</dc:date>
    </item>
  </channel>
</rss>

