<?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: Macro resolving a value that includes a &amp;amp; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/359998#M84680</link>
    <description>&lt;P&gt;2 things. &amp;nbsp;Firstly why would a macro variable named by year, come out with that text? &amp;nbsp;Either naming is wrong or result is wrong.&lt;/P&gt;
&lt;P&gt;Secondly, show the process. &amp;nbsp;A rule of thumb, if you see more than one &amp;amp; anywhere in code then there is 100% chance of refactoring the code to be much simpler and easier to understand. &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 May 2017 14:47:08 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-05-19T14:47:08Z</dc:date>
    <item>
      <title>Macro resolving a value that includes a &amp;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/359985#M84676</link>
      <description>&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a macro that resolves a "&amp;amp;&amp;amp;byyear&amp;amp;i" into "E&amp;amp;M Nephrologist" and SAS keeps trying to resolve the &amp;amp; in E&amp;amp;M.&amp;nbsp; There's no error, just a warning in the log, but due to the fact that it's in code that takes a while to run, i have set it up to check &amp;amp;syserr and only continue when syserr=0.&amp;nbsp; But warnings are not zeros, so the code is stopping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i've updated the code that looked only for syserr=0 and changed it to syserr in (0 4), but it got me to thinking, is there a way to tell sas to ignore the &amp;amp; in the E&amp;amp;M, while at the same time, not ignore the &amp;amp;&amp;amp;byyear&amp;amp;i?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need the &amp;amp;&amp;amp;byyear&amp;amp;i in double quotes or it won't resolve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&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, 19 May 2017 14:24:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/359985#M84676</guid>
      <dc:creator>MeganE</dc:creator>
      <dc:date>2017-05-19T14:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Macro resolving a value that includes a &amp;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/359993#M84678</link>
      <description>&lt;P&gt;It may help get a better answer by showing the code where you are using this.&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 14:33:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/359993#M84678</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-05-19T14:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Macro resolving a value that includes a &amp;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/359996#M84679</link>
      <description>&lt;P&gt;"%superq(byyear&amp;amp;ii)"&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 14:37:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/359996#M84679</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-05-19T14:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Macro resolving a value that includes a &amp;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/359998#M84680</link>
      <description>&lt;P&gt;2 things. &amp;nbsp;Firstly why would a macro variable named by year, come out with that text? &amp;nbsp;Either naming is wrong or result is wrong.&lt;/P&gt;
&lt;P&gt;Secondly, show the process. &amp;nbsp;A rule of thumb, if you see more than one &amp;amp; anywhere in code then there is 100% chance of refactoring the code to be much simpler and easier to understand. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 14:47:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/359998#M84680</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-19T14:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Macro resolving a value that includes a &amp;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/360005#M84684</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;2 things. &amp;nbsp;Firstly why would a macro variable named by year, come out with that text? &amp;nbsp;Either naming is wrong or result is wrong.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Really, isn't this irrelevant to solving the problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;Secondly, show the process. A rule of thumb, if you see more than one &amp;amp; anywhere in code then there is 100% chance of refactoring the code to be much simpler and easier to understand.&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;I myself have sometimes fallen into the trap of telling people that there's only one right tool in SAS to solve the problem. But, what is the "right" way to solve a problem to you, and "simpler and easier to understand" to you, may not be the right tool for others and may be much more complicated and difficult to understand. I have no problem with code that contains &amp;amp;&amp;amp;, there are many situations where it has been useful to me.&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 14:57:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/360005#M84684</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-05-19T14:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Macro resolving a value that includes a &amp;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/360020#M84690</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;Really, isn't this irrelevant to solving the problem?"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yes, it may be that the macro variable itself is not reolving correctly, or using the wrong data leading to the issue. &amp;nbsp;Byyear would indicate a variable should resolve to a year value, so why is the &amp;amp; appearing in such a way?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"byyear" - this in itself indicates by group processing. &amp;nbsp;If you feel having several &amp;amp;&amp;amp; and convoluted methods to debug such code as against by group processing which is a fundamental concept of SAS, then good for you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 15:27:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/360020#M84690</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-19T15:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Macro resolving a value that includes a &amp;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/360022#M84692</link>
      <description>&lt;P&gt;Don't worry about what i name my macros.&amp;nbsp; It was supposed to resolve to E&amp;amp;M Nephrology and it did.&amp;nbsp; There is no error in my code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The question i posted about was, how can i get sas to ignore the &amp;amp; in the E&amp;amp;M Nephrology value while not ignoring the &amp;amp; it has to resolve to get there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 15:31:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-resolving-a-value-that-includes-a-amp/m-p/360022#M84692</guid>
      <dc:creator>MeganE</dc:creator>
      <dc:date>2017-05-19T15:31:24Z</dc:date>
    </item>
  </channel>
</rss>

