<?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: one question about marco in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/one-question-about-marco/m-p/785588#M250726</link>
    <description>Thank you for your help.</description>
    <pubDate>Sat, 11 Dec 2021 19:14:33 GMT</pubDate>
    <dc:creator>tianerhu</dc:creator>
    <dc:date>2021-12-11T19:14:33Z</dc:date>
    <item>
      <title>one question about marco</title>
      <link>https://communities.sas.com/t5/SAS-Programming/one-question-about-marco/m-p/785559#M250714</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*Step 3: Creating sas data sets*/

 /*CDM datasets*/

%macro CDM (Domain= ) ;

PROC IMPORT DATAFILE= "&amp;amp;root./data/data_excel/CDM/&amp;amp;domain..xlsx"
            DBMS=XLSX OUT= CDM.&amp;amp;domain  ;
     GETNAMES=YES;
RUN;

%mend CDM ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;in the&lt;SPAN class="keyword"&gt; parentheses, what is 'Domain='? what role is it ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:01:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/one-question-about-marco/m-p/785559#M250714</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-12-11T16:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: one question about marco</title>
      <link>https://communities.sas.com/t5/SAS-Programming/one-question-about-marco/m-p/785560#M250715</link>
      <description>&lt;P&gt;It is a macro parameter, which is used like a macro variable in the macro.&lt;/P&gt;
&lt;P&gt;And since it is a named parameter, it must also be supplied as such when the macro is called:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%cdm(domain=xxx)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:10:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/one-question-about-marco/m-p/785560#M250715</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-12-11T16:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: one question about marco</title>
      <link>https://communities.sas.com/t5/SAS-Programming/one-question-about-marco/m-p/785561#M250716</link>
      <description>&lt;P&gt;Search:&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4539"&gt;@Sas&lt;/a&gt;.com %macro statement&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.google.com/search?q=%40sas.com+%25macro+statement" target="_blank"&gt;https://www.google.com/search?q=%40sas.com+%25macro+statement&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Read:&amp;nbsp;&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p1nypovnwon4uyn159rst8pgzqrl.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p1nypovnwon4uyn159rst8pgzqrl.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The text inside the () in the %MACRO statement defines the parameters to the macro.&lt;/P&gt;
&lt;P&gt;So in this %CDM() macro&amp;nbsp;DOMAIN is the name of the parameter.&lt;/P&gt;
&lt;P&gt;The equal sign means that you must pass the value by name when calling the macro.&amp;nbsp; &amp;nbsp;So if you wanted to run the %CDM macro for the AE domain you would use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%cdm(domain=ae)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you remove the equal sign in the %MACRO statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro cdm(domain);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then you could have passed the value for DOMAIN in the call to the macro just by its position.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%cdm(ae)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that even if you define the macro such that a parameter may be passed by position you can always pass the values by name.&amp;nbsp; So %cdm(domain=ae) will work with either way of defining the DOMAIN parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:13:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/one-question-about-marco/m-p/785561#M250716</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-12-11T16:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: one question about marco</title>
      <link>https://communities.sas.com/t5/SAS-Programming/one-question-about-marco/m-p/785588#M250726</link>
      <description>Thank you for your help.</description>
      <pubDate>Sat, 11 Dec 2021 19:14:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/one-question-about-marco/m-p/785588#M250726</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-12-11T19:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: one question about marco</title>
      <link>https://communities.sas.com/t5/SAS-Programming/one-question-about-marco/m-p/785589#M250727</link>
      <description>thank for your help.</description>
      <pubDate>Sat, 11 Dec 2021 19:15:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/one-question-about-marco/m-p/785589#M250727</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-12-11T19:15:13Z</dc:date>
    </item>
  </channel>
</rss>

