<?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 How to remove the quotes from a horizontal list of values of a macro variable in SAS? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-quotes-from-a-horizontal-list-of-values-of-a/m-p/900032#M355711</link>
    <description>&lt;PRE&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228828#M14458" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228828#M14458&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Using the code from the above link, I was trying to remove the quotes from the values of the macro variable &amp;amp;varlist below.&lt;BR /&gt;&lt;BR /&gt;%let varlist ="CVDLAYCA31" "CVDLAYCA42" "CVDLAYCA53" "CVDLAYDN31" "CVDLAYDN42" "CVDLAYDN53" "CVDLAYPM31" "CVDLAYPM42" "CVDLAYPM53"
"CVVACCINE42" "CVVACCINE53" "BOOSTERSHOT53";

%put %qsysfunc(dequote(&amp;amp;varlist));&lt;/PRE&gt;
&lt;P&gt;Got output in the SAS Log:&amp;nbsp;CVDLAYCA31&lt;/P&gt;
&lt;P&gt;Desired output:&amp;nbsp;CVDLAYCA31 CVDLAYCA42 CVDLAYCA53 CVDLAYDN31 CVDLAYDN42 CVDLAYDN53 CVDLAYPM31 CVDLAYPM42 CVDLAYPM53 CVVACCINE42 CVVACCINE53 BOOSTERSHOT53&lt;/P&gt;
&lt;P&gt;Issue:&amp;nbsp; I get only one value with the quotes from the list, not the remining values.&lt;/P&gt;
&lt;P&gt;What changes would I make to the code %put %qsysfunc(dequote(&amp;amp;varlist)); to get the desired output?&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Oct 2023 20:43:44 GMT</pubDate>
    <dc:creator>pkm_edu</dc:creator>
    <dc:date>2023-10-25T20:43:44Z</dc:date>
    <item>
      <title>How to remove the quotes from a horizontal list of values of a macro variable in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-quotes-from-a-horizontal-list-of-values-of-a/m-p/900032#M355711</link>
      <description>&lt;PRE&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228828#M14458" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Remove-quotes-from-macro-variable-LET/m-p/228828#M14458&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Using the code from the above link, I was trying to remove the quotes from the values of the macro variable &amp;amp;varlist below.&lt;BR /&gt;&lt;BR /&gt;%let varlist ="CVDLAYCA31" "CVDLAYCA42" "CVDLAYCA53" "CVDLAYDN31" "CVDLAYDN42" "CVDLAYDN53" "CVDLAYPM31" "CVDLAYPM42" "CVDLAYPM53"
"CVVACCINE42" "CVVACCINE53" "BOOSTERSHOT53";

%put %qsysfunc(dequote(&amp;amp;varlist));&lt;/PRE&gt;
&lt;P&gt;Got output in the SAS Log:&amp;nbsp;CVDLAYCA31&lt;/P&gt;
&lt;P&gt;Desired output:&amp;nbsp;CVDLAYCA31 CVDLAYCA42 CVDLAYCA53 CVDLAYDN31 CVDLAYDN42 CVDLAYDN53 CVDLAYPM31 CVDLAYPM42 CVDLAYPM53 CVVACCINE42 CVVACCINE53 BOOSTERSHOT53&lt;/P&gt;
&lt;P&gt;Issue:&amp;nbsp; I get only one value with the quotes from the list, not the remining values.&lt;/P&gt;
&lt;P&gt;What changes would I make to the code %put %qsysfunc(dequote(&amp;amp;varlist)); to get the desired output?&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 20:43:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-quotes-from-a-horizontal-list-of-values-of-a/m-p/900032#M355711</guid>
      <dc:creator>pkm_edu</dc:creator>
      <dc:date>2023-10-25T20:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the quotes from a horizontal list of values of a macro variable in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-quotes-from-a-horizontal-list-of-values-of-a/m-p/900033#M355712</link>
      <description>&lt;P&gt;That is not what the DEQUOTE() function does.&amp;nbsp; To use that function you would have to first pull out each quoted sub-string.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you juts want to remove a character (or a list of characters) use the COMPRESS() function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %qsysfunc(compress(&amp;amp;varlist,%str(%")));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the list might have some of them quoted with single quotes then remove both in one call.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %qsysfunc(compress(&amp;amp;varlist,'"')));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Oct 2023 20:56:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-quotes-from-a-horizontal-list-of-values-of-a/m-p/900033#M355712</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-10-25T20:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the quotes from a horizontal list of values of a macro variable in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-quotes-from-a-horizontal-list-of-values-of-a/m-p/900034#M355713</link>
      <description>&lt;P&gt;I deleted the last parenthesis from your code as follows.&lt;/P&gt;
&lt;P&gt;%put %qsysfunc(compress(&amp;amp;varlist,'"'));&lt;/P&gt;
&lt;P&gt;The code has worked.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 21:06:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-quotes-from-a-horizontal-list-of-values-of-a/m-p/900034#M355713</guid>
      <dc:creator>pkm_edu</dc:creator>
      <dc:date>2023-10-25T21:06:24Z</dc:date>
    </item>
  </channel>
</rss>

