<?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: creation of macro variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/creation-of-macro-variables/m-p/96768#M20411</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we can create macro variables in many ways.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;%let&lt;/LI&gt;&lt;LI&gt;call symput&lt;/LI&gt;&lt;LI&gt;into(proc sql)&lt;/LI&gt;&lt;LI&gt;macro(while passing parameters into the macro ,that parameters are acts&amp;nbsp; as local macro variables)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;and if you use %do statements in with in the macro,&lt;/P&gt;&lt;P&gt;for example %macro test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do i=1 %to 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ..........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;in that example "i" also become a local macro variable.&lt;/P&gt;&lt;P&gt;and I don't think that&amp;nbsp; we can create macro variables directly by using %local and %global statements.&lt;/P&gt;&lt;P&gt;generally we use % local and %global statement before %let statement to specify weather the macro variable become local or global.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sanjeev K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 May 2012 09:51:38 GMT</pubDate>
    <dc:creator>kuridisanjeev</dc:creator>
    <dc:date>2012-05-02T09:51:38Z</dc:date>
    <item>
      <title>creation of macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creation-of-macro-variables/m-p/96765#M20408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Is there any other way to create MACRO VARIABLES except %let and callsymput.This is an interview question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards&lt;/P&gt;&lt;P&gt;Rawindarreddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2012 04:48:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creation-of-macro-variables/m-p/96765#M20408</guid>
      <dc:creator>rawindar</dc:creator>
      <dc:date>2012-04-27T04:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: creation of macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creation-of-macro-variables/m-p/96766#M20409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;you can create using proc sql and also when you create a macro program parameters are automatically macro variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2012 04:50:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creation-of-macro-variables/m-p/96766#M20409</guid>
      <dc:creator>manojinpec</dc:creator>
      <dc:date>2012-04-27T04:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: creation of macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creation-of-macro-variables/m-p/96767#M20410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%local %global :into(proc sql);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2012 05:05:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creation-of-macro-variables/m-p/96767#M20410</guid>
      <dc:creator>shivas</dc:creator>
      <dc:date>2012-04-27T05:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: creation of macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creation-of-macro-variables/m-p/96768#M20411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we can create macro variables in many ways.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;%let&lt;/LI&gt;&lt;LI&gt;call symput&lt;/LI&gt;&lt;LI&gt;into(proc sql)&lt;/LI&gt;&lt;LI&gt;macro(while passing parameters into the macro ,that parameters are acts&amp;nbsp; as local macro variables)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;and if you use %do statements in with in the macro,&lt;/P&gt;&lt;P&gt;for example %macro test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do i=1 %to 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ..........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;in that example "i" also become a local macro variable.&lt;/P&gt;&lt;P&gt;and I don't think that&amp;nbsp; we can create macro variables directly by using %local and %global statements.&lt;/P&gt;&lt;P&gt;generally we use % local and %global statement before %let statement to specify weather the macro variable become local or global.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sanjeev K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 09:51:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creation-of-macro-variables/m-p/96768#M20411</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2012-05-02T09:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: creation of macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creation-of-macro-variables/m-p/96769#M20412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's not entirely correct. %local and %global create macro variables with null values. Even without assigning a value to them with %let, you can reference them without error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 11:53:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creation-of-macro-variables/m-p/96769#M20412</guid>
      <dc:creator>FloydNevseta</dc:creator>
      <dc:date>2012-05-02T11:53:01Z</dc:date>
    </item>
  </channel>
</rss>

