<?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: Defining the components inside of a Macro. What is dot and exclamation sign in this Macro? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Defining-the-components-inside-of-a-Macro-What-is-dot-and/m-p/736691#M229546</link>
    <description>Are you finding the Macro documentation unhelpful in answering these questions? it seems pretty straightforward to answer questions such as your third one: Is %put a Macro statement which writes the result of the Macro into the log?&lt;BR /&gt;&lt;BR /&gt;%PUT Macro Statement&lt;BR /&gt;Writes text or macro variable information to the SAS log.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/n189qvy83pmkt6n1bq2mmwtyb4oe.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/n189qvy83pmkt6n1bq2mmwtyb4oe.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 23 Apr 2021 22:18:01 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-04-23T22:18:01Z</dc:date>
    <item>
      <title>Defining the components inside of a Macro. What is dot and exclamation sign in this Macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Defining-the-components-inside-of-a-Macro-What-is-dot-and/m-p/736679#M229541</link>
      <description>&lt;P&gt;Hello team,&lt;/P&gt;
&lt;P&gt;I have a Macro as below:&lt;/P&gt;
&lt;P&gt;%MACRO a(text=);&lt;BR /&gt;%put %str(N)OTE: &amp;amp;param. &amp;amp;text.!;&lt;BR /&gt;%MEND a;&lt;/P&gt;
&lt;P&gt;%MACRO b(param=);&lt;BR /&gt;%if %lowcase(&amp;amp;param.) eq hello %then %a(text=Dear);&lt;BR /&gt;%MEND b;&lt;BR /&gt;%b(param=HelLO);&lt;/P&gt;
&lt;P&gt;----&lt;/P&gt;
&lt;P&gt;I am trying to define the components of this Macro for myself:&lt;/P&gt;
&lt;P&gt;Is "a" in %Macro a name of the Macro?&lt;/P&gt;
&lt;P&gt;Is (text) in a(text) a parameter for Macro a?&lt;/P&gt;
&lt;P&gt;Is %put a Macro statement which writes the result of the Macro into the log?&lt;/P&gt;
&lt;P&gt;Is %str a Macro statement which masks parentheses?&lt;/P&gt;
&lt;P&gt;Are &amp;amp;Param and &amp;amp;Text a call to the parameters param and text?&lt;/P&gt;
&lt;P&gt;Why do we have . and exclamation sign in this code:&amp;nbsp;%put %str(N)OTE: &amp;amp;param. &amp;amp;text.!;?&lt;/P&gt;
&lt;P&gt;Why difference did it make if enter (N)OTE as Note? Do we want to show the implementation of STR function?&lt;/P&gt;
&lt;P&gt;Does SAS process the code line by line?&lt;/P&gt;
&lt;P&gt;If you have more input about this piece of code, please explain it.&lt;/P&gt;
&lt;P&gt;Respectfully,&lt;/P&gt;
&lt;P&gt;Blue Sky&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 21:33:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Defining-the-components-inside-of-a-Macro-What-is-dot-and/m-p/736679#M229541</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-04-23T21:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the components inside of a Macro. What is dot and exclamation sign in this Macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Defining-the-components-inside-of-a-Macro-What-is-dot-and/m-p/736684#M229544</link>
      <description>&lt;P&gt;In the macro processor the . indicates the end of a macro variable name or "concatenate" sort of operator for a macro variable followed by other text in the macro language.&lt;/P&gt;
&lt;P&gt;The ! is punctuation to display at the end the end of sentence.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might see why the . is needed if you run:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%let text=ABC;
%put Test 1: &amp;amp;text123;
%put Test 2: &amp;amp;text.123;&lt;/PRE&gt;
&lt;P&gt;The first %put generates an error because "text123" could be a valid macro variable name but not currently defined (most likely). The second tells SAS to place the digits "123" immediately after the value of the macro variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is why when you use macro variables to reference libraries you see two . between the library reference and the data set name such as :&lt;/P&gt;
&lt;P&gt;Proc print data=&amp;amp;maclib..&amp;amp;macdatasetname. The first dot ends the library name and the second dot is the typical separator between library and data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 21:51:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Defining-the-components-inside-of-a-Macro-What-is-dot-and/m-p/736684#M229544</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-04-23T21:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the components inside of a Macro. What is dot and exclamation sign in this Macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Defining-the-components-inside-of-a-Macro-What-is-dot-and/m-p/736691#M229546</link>
      <description>Are you finding the Macro documentation unhelpful in answering these questions? it seems pretty straightforward to answer questions such as your third one: Is %put a Macro statement which writes the result of the Macro into the log?&lt;BR /&gt;&lt;BR /&gt;%PUT Macro Statement&lt;BR /&gt;Writes text or macro variable information to the SAS log.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/n189qvy83pmkt6n1bq2mmwtyb4oe.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/n189qvy83pmkt6n1bq2mmwtyb4oe.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Apr 2021 22:18:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Defining-the-components-inside-of-a-Macro-What-is-dot-and/m-p/736691#M229546</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-04-23T22:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Defining the components inside of a Macro. What is dot and exclamation sign in this Macro?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Defining-the-components-inside-of-a-Macro-What-is-dot-and/m-p/736707#M229556</link>
      <description>Yes, I got what I wanted by referring to this link.&lt;BR /&gt;Regards,&lt;BR /&gt;Blue Sky</description>
      <pubDate>Sat, 24 Apr 2021 03:29:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Defining-the-components-inside-of-a-Macro-What-is-dot-and/m-p/736707#M229556</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-04-24T03:29:12Z</dc:date>
    </item>
  </channel>
</rss>

