<?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: Properly mask comment character (*) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Properly-mask-comment-character/m-p/488850#M127476</link>
    <description>&lt;P&gt;This might be one of the instances where it is better to have quotes in the macro variable.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Aug 2018 12:52:12 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-08-22T12:52:12Z</dc:date>
    <item>
      <title>Properly mask comment character (*)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Properly-mask-comment-character/m-p/488846#M127473</link>
      <description>&lt;P&gt;I have more or less&amp;nbsp;the following code:&lt;/P&gt;&lt;PRE&gt;/* previous operations to get macrovariable values for foldin, end and out */

%let final_command=cat &amp;amp;foldin./*-&amp;amp;end. &amp;gt;&amp;gt; &amp;amp;out.;

%macro doit(command);
  filename p pipe "&amp;amp;command" lrecl=32767;
  data _null_;
  infile p;
  input;
  put _infile_;
  run;
%mend;

%doit(&amp;amp;final_command)&lt;/PRE&gt;&lt;P&gt;which, under a Linux environment, should paste together a few files named a-..., b-..., c-... and so on (where the dots reprents the same value that corresponds to &amp;amp;end) from the folder whose name is in foldin to a file named &amp;amp;out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've did a few test and the problem is clearly that I'm passing the character * as part of the macrovariable value. I've tried to use quoting functions, but I either don't mask him well enough and he gets read as a comment during macro execution, or I do it much and final_command isn't resolved properly.&lt;/P&gt;&lt;P&gt;Any idea how to solve it? I'm quite confused about quoting functions, so I would appreciate if someone can point out a very simple and easy to understand guide about them.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 12:38:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Properly-mask-comment-character/m-p/488846#M127473</guid>
      <dc:creator>Andrea_Bocco</dc:creator>
      <dc:date>2018-08-22T12:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Properly mask comment character (*)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Properly-mask-comment-character/m-p/488848#M127475</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let final_command="cat &amp;amp;foldin./*-&amp;amp;end. &amp;gt;&amp;gt; &amp;amp;out.";
%put NOTE: &amp;amp;=Final_command;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Aug 2018 12:44:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Properly-mask-comment-character/m-p/488848#M127475</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2018-08-22T12:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Properly mask comment character (*)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Properly-mask-comment-character/m-p/488850#M127476</link>
      <description>&lt;P&gt;This might be one of the instances where it is better to have quotes in the macro variable.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 12:52:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Properly-mask-comment-character/m-p/488850#M127476</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-22T12:52:12Z</dc:date>
    </item>
  </channel>
</rss>

