<?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 prevent macro resolution in open code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-prevent-macro-resolution-in-open-code/m-p/184183#M34975</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Astounding, that's it!!&amp;nbsp;&amp;nbsp; %SUPERQ() doesn't want the &amp;amp; for the macro variable.&amp;nbsp; I knew I was missing something simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Patrick, Thanks for a workable second solution.&amp;nbsp; Sometimes I get so fixated on a specific solution that I don't stop, take a breath, and consider alternatives.&amp;nbsp; If I could give you both Correct Answer credit I would, but Astounding was first by a few minutes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Feb 2015 19:11:42 GMT</pubDate>
    <dc:creator>bentleyj1</dc:creator>
    <dc:date>2015-02-26T19:11:42Z</dc:date>
    <item>
      <title>How to prevent macro resolution in open code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-prevent-macro-resolution-in-open-code/m-p/184180#M34972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a macro variable named &amp;amp;_badFileName.&amp;nbsp; It contains the value &amp;amp;cmpn_cd_YYYYMMDD_TEST_DONT_LOAD.&amp;nbsp; The code runs in open code, not a macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to print the text vallue of the macro variable in an error message _without_ the value of &amp;amp;cmpn_cd being resolved.&amp;nbsp; I want to see the string &amp;amp;cmpn_cd_YYYYMMDD_TEST_DONT_LOAD in my error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried all of the quoting function I can think of.&lt;/P&gt;&lt;P&gt;I've tried nesting some of the functions.&lt;/P&gt;&lt;P&gt;I've tried using quoting functions in a %let statement to reassign the value of &amp;amp;_badFileName there instead of in the putlog statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But they either try to resolve &amp;amp;_badFileName and return the Error seen below below or prevent resolution of &amp;amp;_badFileName so that &amp;amp;_badFileName prints in the message as text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to me that I need a quoting function that masks resolution at execution.&amp;nbsp; I'm sure I'm missing something simple, but Help will be greatly appreciated.&amp;nbsp; Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;9707 data _null_;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;19708 putlog '-----';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;19709 putlog "USER-DEFINED ERROR: At least 1 Output File Name in the &amp;amp;_excelWorkbookName Output_Fields worksheet is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;19709! bad.";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;19710 putlog ' It must contain a valid date formatted as YYYYMMDD.';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;19711 putlog " The bad Output File Names are %nrbquote(&amp;amp;_badFileNames)..";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: Symbolic variable name CMPN_CD_YYYYMMDD_TEST_DO_NOT_LOAD must be 32 or fewer characters long.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;19712 putlog '-----';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;19713 run;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 18:35:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-prevent-macro-resolution-in-open-code/m-p/184180#M34972</guid>
      <dc:creator>bentleyj1</dc:creator>
      <dc:date>2015-02-26T18:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent macro resolution in open code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-prevent-macro-resolution-in-open-code/m-p/184181#M34973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call symputx('_badFileName','&amp;amp;cmpn_cd_YYYYMMDD_TEST_DONT_LOAD');&lt;/P&gt;&lt;P&gt;&amp;nbsp; stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; badfile=symget('_badFileName');&lt;/P&gt;&lt;P&gt;&amp;nbsp; putlog "The bad Output File Names are " badfile;&lt;/P&gt;&lt;P&gt;&amp;nbsp; stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...or this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; putlog "The bad Output File Names are %superq(_badFileName)";&lt;/P&gt;&lt;P&gt;&amp;nbsp; stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 19:03:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-prevent-macro-resolution-in-open-code/m-p/184181#M34973</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-02-26T19:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent macro resolution in open code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-prevent-macro-resolution-in-open-code/m-p/184182#M34974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;putlog " The bad Output File Names are %superq(_badFileNames).";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that the &amp;amp; is removed ... it's supposed to be that way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 19:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-prevent-macro-resolution-in-open-code/m-p/184182#M34974</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-02-26T19:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent macro resolution in open code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-prevent-macro-resolution-in-open-code/m-p/184183#M34975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Astounding, that's it!!&amp;nbsp;&amp;nbsp; %SUPERQ() doesn't want the &amp;amp; for the macro variable.&amp;nbsp; I knew I was missing something simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Patrick, Thanks for a workable second solution.&amp;nbsp; Sometimes I get so fixated on a specific solution that I don't stop, take a breath, and consider alternatives.&amp;nbsp; If I could give you both Correct Answer credit I would, but Astounding was first by a few minutes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 19:11:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-prevent-macro-resolution-in-open-code/m-p/184183#M34975</guid>
      <dc:creator>bentleyj1</dc:creator>
      <dc:date>2015-02-26T19:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent macro resolution in open code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-prevent-macro-resolution-in-open-code/m-p/184184#M34976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you really must have the &amp;amp;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: Consolas; font-size: 9pt;"&gt;%let &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: Consolas; font-size: 9pt;"&gt;_badFileName = &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: Consolas; font-size: 9pt;"&gt;%nrstr&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: Consolas; font-size: 9pt;"&gt;(&amp;amp;cmpn_cd_YYYYMMDD_TEST_DONT_LOAD);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: Consolas;"&gt;data&lt;/STRONG&gt; &lt;SPAN style="background: white; color: blue; font-family: Consolas; font-size: 9pt;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: Consolas; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: white; color: blue; font-family: Consolas; font-size: 9pt;"&gt;putlog&lt;/SPAN&gt; &lt;SPAN style="background: white; color: purple; font-family: Consolas; font-size: 9pt;"&gt;"&amp;amp;_badFileName"&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: Consolas; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: Consolas;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: Consolas; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 19:17:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-prevent-macro-resolution-in-open-code/m-p/184184#M34976</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-02-26T19:17:53Z</dc:date>
    </item>
  </channel>
</rss>

