<?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 Convert local to global macro vice versa used %global in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-local-to-global-macro-vice-versa-used-global/m-p/20354#M3187</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I wnat to convert the local to gloabl and global to local macro variables&lt;BR /&gt;can any one help me with some examples&lt;/P&gt;&lt;P&gt;in the above i have tryed like this&lt;/P&gt;&lt;P&gt;%macro a;&lt;BR /&gt;%let loc=10;&lt;BR /&gt;%put &amp;amp;loc;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;%a;&lt;/P&gt;&lt;P&gt;%global &amp;amp;loc;&lt;/P&gt;&lt;P&gt;Tryed&lt;/P&gt;&lt;P&gt;%global loc;&lt;/P&gt;&lt;P&gt;%put &amp;amp;loc;&lt;/P&gt;&lt;P&gt;it should reove to 10 but it was not resloving&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Dec 2011 09:25:56 GMT</pubDate>
    <dc:creator>sas_</dc:creator>
    <dc:date>2011-12-26T09:25:56Z</dc:date>
    <item>
      <title>Convert local to global macro vice versa used %global</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-local-to-global-macro-vice-versa-used-global/m-p/20354#M3187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I wnat to convert the local to gloabl and global to local macro variables&lt;BR /&gt;can any one help me with some examples&lt;/P&gt;&lt;P&gt;in the above i have tryed like this&lt;/P&gt;&lt;P&gt;%macro a;&lt;BR /&gt;%let loc=10;&lt;BR /&gt;%put &amp;amp;loc;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;%a;&lt;/P&gt;&lt;P&gt;%global &amp;amp;loc;&lt;/P&gt;&lt;P&gt;Tryed&lt;/P&gt;&lt;P&gt;%global loc;&lt;/P&gt;&lt;P&gt;%put &amp;amp;loc;&lt;/P&gt;&lt;P&gt;it should reove to 10 but it was not resloving&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Dec 2011 09:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-local-to-global-macro-vice-versa-used-global/m-p/20354#M3187</guid>
      <dc:creator>sas_</dc:creator>
      <dc:date>2011-12-26T09:25:56Z</dc:date>
    </item>
    <item>
      <title>Convert local to global macro vice versa used %global</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-local-to-global-macro-vice-versa-used-global/m-p/20355#M3188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOCAL&amp;nbsp; --&amp;gt; GLOBAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;%macro a;
%global global_loc;

%let loc=10;
%let global_loc=&amp;amp;loc;
%mend;

%a

%put &amp;amp;global_loc;






&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Dec 2011 09:35:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-local-to-global-macro-vice-versa-used-global/m-p/20355#M3188</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-12-26T09:35:06Z</dc:date>
    </item>
    <item>
      <title>Convert local to global macro vice versa used %global</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-local-to-global-macro-vice-versa-used-global/m-p/20356#M3189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; small query is there any thing that we can convert global to local macros&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Dec 2011 10:12:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-local-to-global-macro-vice-versa-used-global/m-p/20356#M3189</guid>
      <dc:creator>sas_</dc:creator>
      <dc:date>2011-12-26T10:12:23Z</dc:date>
    </item>
    <item>
      <title>Convert local to global macro vice versa used %global</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-local-to-global-macro-vice-versa-used-global/m-p/20357#M3190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure. You can't force global macro variable to be local, but you can pass the value of gloale to local.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;%global global_loc;
%let global_loc=Merry_Christmas;


%macro a;
%let loc=&amp;amp;global_loc;
%put &amp;amp;loc;
%mend;

%a




&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Dec 2011 11:41:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-local-to-global-macro-vice-versa-used-global/m-p/20357#M3190</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-12-26T11:41:42Z</dc:date>
    </item>
  </channel>
</rss>

