<?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: Different ways to define a macro variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Different-ways-to-define-a-macro-variable/m-p/837795#M331276</link>
    <description>&lt;P&gt;"&lt;SPAN&gt;&lt;EM&gt;Is this macro statement also defining yymmdd as a macro variable?&lt;/EM&gt;"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Intuitively yes, but we can of course not say without knowing what the macro does.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Add the following options before the macro call:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;options mprint symbolgen mautolocdisplay;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;The mprint will print the macro definition to the SAS log, symbolgen will print to the log to what the macro variables resolve and mautolocdisplay will print where the macro is stored so you know where you can find the macro source code for further investigation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Oct 2022 07:16:02 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2022-10-11T07:16:02Z</dc:date>
    <item>
      <title>Different ways to define a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-ways-to-define-a-macro-variable/m-p/837794#M331275</link>
      <description>I have a macro variable and i cannot find where it is defined.. it appears in file names eg staging.credit_card_account_h_&amp;amp;yymmdd.&lt;BR /&gt;&lt;BR /&gt;And before this file name appears, all I can see that is relating is &lt;BR /&gt;%macro genstage(yymmdd)&lt;BR /&gt;&lt;BR /&gt;Is this macro statement also defining yymmdd as  a macro variable?</description>
      <pubDate>Tue, 11 Oct 2022 07:09:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-ways-to-define-a-macro-variable/m-p/837794#M331275</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-10-11T07:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Different ways to define a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-ways-to-define-a-macro-variable/m-p/837795#M331276</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;&lt;EM&gt;Is this macro statement also defining yymmdd as a macro variable?&lt;/EM&gt;"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Intuitively yes, but we can of course not say without knowing what the macro does.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Add the following options before the macro call:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;options mprint symbolgen mautolocdisplay;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;The mprint will print the macro definition to the SAS log, symbolgen will print to the log to what the macro variables resolve and mautolocdisplay will print where the macro is stored so you know where you can find the macro source code for further investigation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 07:16:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-ways-to-define-a-macro-variable/m-p/837795#M331276</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-10-11T07:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Different ways to define a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-ways-to-define-a-macro-variable/m-p/837796#M331277</link>
      <description>&lt;P&gt;Yes. According to the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p1nypovnwon4uyn159rst8pgzqrl.htm" target="_self"&gt;%MACRO Macro Statement&lt;/A&gt;, the parameter list:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;names one or more local macro variables whose values you specify when you invoke the macro. Parameters are local to the macro that defines them. You must supply each parameter name; you cannot use a text expression to generate it. A parameter list can contain any number of macro parameters separated by commas. The macro variables in the parameter list are usually referenced in the macro.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 07:17:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-ways-to-define-a-macro-variable/m-p/837796#M331277</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-10-11T07:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: Different ways to define a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-ways-to-define-a-macro-variable/m-p/837811#M331284</link>
      <description>&lt;P&gt;Maybe an oversight&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416388"&gt;@HeatherNewton&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;%macro genstage(yymmdd)&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;but that should have a semi-colon on the end, or it will generate an error and will not create a macro variable by that name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro genstage(yymmdd);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 10:50:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-ways-to-define-a-macro-variable/m-p/837811#M331284</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-10-11T10:50:07Z</dc:date>
    </item>
  </channel>
</rss>

