<?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: Remove quotes from macro variable LET in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228828#M14458</link>
    <description>&lt;P&gt;Agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9﻿&lt;/a&gt;&amp;nbsp;about not adding the quotes in the first place.&amp;nbsp; But if you want to remove them, you can use the DEQUOTE function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;1    %LET RepQuarter = '4th (October-December)';
2
3    data _null_;
4      put "&amp;lt;quarter&amp;gt;&amp;amp;RepQuarter" ;
5      put "&amp;lt;quarter&amp;gt;%sysfunc(dequote(&amp;amp;RepQuarter))" ;
6    run;

&amp;lt;quarter&amp;gt;'4th (October-December)'
&amp;lt;quarter&amp;gt;4th (October-December)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Oct 2015 11:43:59 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2015-10-07T11:43:59Z</dc:date>
    <item>
      <title>Remove quotes from macro variable LET</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228796#M14454</link>
      <description>&lt;P&gt;Hi SAS Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am creating a macro variable %LET RepQuarter = '4th (October-December)'; and insert it later on&lt;/P&gt;
&lt;P&gt;in my custom ods xml tagset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define event EmitMetaMainMessage;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;xdent;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;put "&amp;lt;/Metas&amp;gt;" CR;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;put "&amp;lt;main&amp;gt;" CR;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;put "&amp;lt;year&amp;gt;&amp;amp;RepYear" ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;put "&amp;lt;/year&amp;gt;" CR;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;put "&amp;lt;quarter&amp;gt;&amp;amp;RepQuarter" ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;put "&amp;lt;/quarter&amp;gt;" CR;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I need it without the quotes'. How can I remove those?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bye&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 09:24:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228796#M14454</guid>
      <dc:creator>metallon</dc:creator>
      <dc:date>2015-10-07T09:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Remove quotes from macro variable LET</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228804#M14455</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why have you put quotes on it in the first place?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%LET RepQuarter = 4th (October-December);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Problem solved. &amp;nbsp;The next question is, why is data in a macro parameter?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 09:36:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228804#M14455</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-10-07T09:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Remove quotes from macro variable LET</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228807#M14456</link>
      <description>Greetings!&lt;BR /&gt;Unfortunately the problem is not solved be removing the quotes:&lt;BR /&gt;&lt;BR /&gt;NOTE: Line generated by the macro variable "REPQUARTER".&lt;BR /&gt;252        4th (October-December)&lt;BR /&gt;            __&lt;BR /&gt;            22&lt;BR /&gt;            76&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, ',', -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN, &lt;BR /&gt;              CONTAINS, EQ, EQT, GE, GET, GT, GTT, LE, LET, LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=.  &lt;BR /&gt;&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;&lt;BR /&gt;The next question is not really a problem I have. I use the variable at various points in the code.</description>
      <pubDate>Wed, 07 Oct 2015 10:39:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228807#M14456</guid>
      <dc:creator>metallon</dc:creator>
      <dc:date>2015-10-07T10:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Remove quotes from macro variable LET</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228808#M14457</link>
      <description>Hi RW9,&lt;BR /&gt;&lt;BR /&gt;The problem is not solved by removing the quotes.&lt;BR /&gt;&lt;BR /&gt;NOTE: Line generated by the macro variable "REPQUARTER".&lt;BR /&gt;252        4th (October-December)&lt;BR /&gt;            __&lt;BR /&gt;            22&lt;BR /&gt;            76&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, ',', -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN, &lt;BR /&gt;              CONTAINS, EQ, EQT, GE, GET, GT, GTT, LE, LET, LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=.  &lt;BR /&gt;&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;&lt;BR /&gt;The second question is not really a problem I have. I just use the macro at various places in the code.</description>
      <pubDate>Wed, 07 Oct 2015 10:40:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228808#M14457</guid>
      <dc:creator>metallon</dc:creator>
      <dc:date>2015-10-07T10:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Remove quotes from macro variable LET</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228828#M14458</link>
      <description>&lt;P&gt;Agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9﻿&lt;/a&gt;&amp;nbsp;about not adding the quotes in the first place.&amp;nbsp; But if you want to remove them, you can use the DEQUOTE function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;1    %LET RepQuarter = '4th (October-December)';
2
3    data _null_;
4      put "&amp;lt;quarter&amp;gt;&amp;amp;RepQuarter" ;
5      put "&amp;lt;quarter&amp;gt;%sysfunc(dequote(&amp;amp;RepQuarter))" ;
6    run;

&amp;lt;quarter&amp;gt;'4th (October-December)'
&amp;lt;quarter&amp;gt;4th (October-December)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 11:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228828#M14458</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2015-10-07T11:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Remove quotes from macro variable LET</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/229071#M14460</link>
      <description>&lt;P&gt;Yes, but then you haven't thought about the data, and the process then have you. &amp;nbsp;If you need parameters, put them into a dataset, its is far easier to work with. &amp;nbsp;Datasets are there to work with Data, macro variables are there as find and replace, and as you are seeing in your example, that find and replace fails as you are using it in multiple ways.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 08:17:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/229071#M14460</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-10-08T08:17:35Z</dc:date>
    </item>
  </channel>
</rss>

