<?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: How to mask % and () inside macros in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-mask-and-inside-macros/m-p/442477#M69301</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/58513"&gt;@DmytroYermak&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Yes, they are not valid variables names in SAS but they are the names of variables in xlsx file that is read as sas library.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So just use name literals to refer to the variable names.&amp;nbsp; Make sure to use single quotes and not double quotes when constructing the name literals so that the macro processor does not try to act on the macro triggers, &amp;amp; or %, that might occur in the variable names.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Mar 2018 19:02:08 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-03-05T19:02:08Z</dc:date>
    <item>
      <title>How to mask % and () inside macros</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-mask-and-inside-macros/m-p/442272#M69288</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could please help to mask the variables Cavg(ss) and AUC_%Extrap_obs&amp;nbsp; in the text of macros:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;...
%if &amp;amp;ppfile=pksc %then %do;
  Cavg(ss)
  AUC_%Extrap_obs;
%end;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 12:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-mask-and-inside-macros/m-p/442272#M69288</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-03-05T12:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to mask % and () inside macros</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-mask-and-inside-macros/m-p/442274#M69289</link>
      <description>&lt;P&gt;&lt;A href="https://v8doc.sas.com/sashtml/macro/z3514str.htm" target="_blank"&gt;https://v8doc.sas.com/sashtml/macro/z3514str.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Seriously though, if your having to use these, do you not think there are better ways of working, because there are, many options.&amp;nbsp; Macro is not a replacement for base SAS, it just makes long winded unmaintainable code which someone has to come in and delete at some point.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 09:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-mask-and-inside-macros/m-p/442274#M69289</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-03-05T09:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to mask % and () inside macros</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-mask-and-inside-macros/m-p/442335#M69291</link>
      <description>&lt;P&gt;Can you explain what this snippet of code is trying to do?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cavg(ss) and AUC_%Extrap_obs are not valid variable names. If those a really your variable names you can reference them with name literals.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;'Cavg(ss)'n 
'AUC_%Extrap_obs'n&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;If that is just text then look at macro quoting functions like %STR().&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%str(Cavg%(ss%)) 
%str(AUC_%%Extrap_obs)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Mar 2018 13:02:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-mask-and-inside-macros/m-p/442335#M69291</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-03-05T13:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to mask % and () inside macros</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-mask-and-inside-macros/m-p/442447#M69297</link>
      <description>&lt;P&gt;Yes, they are not valid variables names in SAS but they are the names of variables in xlsx file that is read as sas library.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 17:53:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-mask-and-inside-macros/m-p/442447#M69297</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-03-05T17:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to mask % and () inside macros</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-mask-and-inside-macros/m-p/442477#M69301</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/58513"&gt;@DmytroYermak&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Yes, they are not valid variables names in SAS but they are the names of variables in xlsx file that is read as sas library.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So just use name literals to refer to the variable names.&amp;nbsp; Make sure to use single quotes and not double quotes when constructing the name literals so that the macro processor does not try to act on the macro triggers, &amp;amp; or %, that might occur in the variable names.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 19:02:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-mask-and-inside-macros/m-p/442477#M69301</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-03-05T19:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to mask % and () inside macros</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-mask-and-inside-macros/m-p/442757#M69304</link>
      <description>&lt;P&gt;I have found this link: it seems that 'do' cycle is needed as well as double ampersant -&amp;nbsp;&lt;A href="https://support.sas.com/resources/papers/proceedings13/005-2013.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings13/005-2013.pdf&lt;/A&gt; . In my understanding it is not ordinary task to force SAS to stop re-scan in searching of macrotriggers. Especially if a program have several ones/levels. I have no final decision yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 06:57:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-mask-and-inside-macros/m-p/442757#M69304</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-03-06T06:57:11Z</dc:date>
    </item>
  </channel>
</rss>

