<?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: symput a macro variable with &amp;quot;/*.dat&amp;quot; in the string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66243#M14388</link>
    <description>an old post, but one with outstanding value and issues ...&lt;BR /&gt;
How &lt;BR /&gt;
&lt;BR /&gt;
%let a= / ;&lt;BR /&gt;
%let b= /&amp;amp;a.*;&lt;BR /&gt;
%put %superQ(b) ;&lt;BR /&gt;
b is established as //*&lt;BR /&gt;
an alternative to /*.dat as a definition of all dat files, would be /?*.dat&lt;BR /&gt;
Separating / and * with ? should not reduce the selection of files selected but will remove that troublesome /* combination&lt;BR /&gt;
 &lt;BR /&gt;
peterC</description>
    <pubDate>Thu, 12 Nov 2009 13:46:58 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2009-11-12T13:46:58Z</dc:date>
    <item>
      <title>symput a macro variable with "/*.dat" in the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66236#M14381</link>
      <description>I'm having difficulty defining a macro variable with the string "/*.dat" in it.   if the * is changed to another character value the code works fine.&lt;BR /&gt;
&lt;BR /&gt;
Is there some type of escape character that needs to proceed a * in this type of string?</description>
      <pubDate>Fri, 21 Aug 2009 19:29:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66236#M14381</guid>
      <dc:creator>JMarkW</dc:creator>
      <dc:date>2009-08-21T19:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: symput a macro variable with "/*.dat" in the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66237#M14382</link>
      <description>Does surrounding the variable with %STR() or %NRSTR() help?</description>
      <pubDate>Fri, 21 Aug 2009 20:17:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66237#M14382</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-08-21T20:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: symput a macro variable with "/*.dat" in the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66238#M14383</link>
      <description>I'm using "call symput" in a data step so the macro commands will not work there.   &lt;BR /&gt;
&lt;BR /&gt;
I'm generating UNIX commands and did find that //*.dat will work while /*.dat will not.</description>
      <pubDate>Mon, 24 Aug 2009 12:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66238#M14383</guid>
      <dc:creator>JMarkW</dc:creator>
      <dc:date>2009-08-24T12:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: symput a macro variable with "/*.dat" in the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66239#M14384</link>
      <description>That won't work.  Those two characters in that order and everything that follows up to and including the chars */ in that order are consumed by the lexical analysis phase of the tokenizer, which thinks you're inserting a comment in your code.  The trigger for this action is the / followed immediately by the *.  That is why no amount of macro quoting will make any difference.</description>
      <pubDate>Mon, 24 Aug 2009 13:43:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66239#M14384</guid>
      <dc:creator>PatrickG</dc:creator>
      <dc:date>2009-08-24T13:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: symput a macro variable with "/*.dat" in the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66240#M14385</link>
      <description>Ok, I took the simple approach to this and it works fine for me.&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
call symput('badstr', '"ls /*.txt ;"');&lt;BR /&gt;
run;&lt;BR /&gt;
x &amp;amp;badstr ;&lt;BR /&gt;
&lt;BR /&gt;
Putting the quotes into the macro variable works, but quoting in the X command will not.  (That is double quotes inside single quotes.)</description>
      <pubDate>Mon, 24 Aug 2009 14:07:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66240#M14385</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2009-08-24T14:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: symput a macro variable with "/*.dat" in the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66241#M14386</link>
      <description>The command is actually very complex grep being created dependent on input data.</description>
      <pubDate>Mon, 24 Aug 2009 15:49:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66241#M14386</guid>
      <dc:creator>JMarkW</dc:creator>
      <dc:date>2009-08-24T15:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: symput a macro variable with "/*.dat" in the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66242#M14387</link>
      <description>I did get the following to work.  I wonder if the first / escapes the second.&lt;BR /&gt;
&lt;BR /&gt;
/usr/xpg4/bin/grep -l -E  -e '^[^|]*\|[^|]*\|abc\|' -e '^[^|]*\|[^|]*\|defg\|' /dir1/dir2/dir3//*.txt</description>
      <pubDate>Mon, 24 Aug 2009 15:53:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66242#M14387</guid>
      <dc:creator>JMarkW</dc:creator>
      <dc:date>2009-08-24T15:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: symput a macro variable with "/*.dat" in the string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66243#M14388</link>
      <description>an old post, but one with outstanding value and issues ...&lt;BR /&gt;
How &lt;BR /&gt;
&lt;BR /&gt;
%let a= / ;&lt;BR /&gt;
%let b= /&amp;amp;a.*;&lt;BR /&gt;
%put %superQ(b) ;&lt;BR /&gt;
b is established as //*&lt;BR /&gt;
an alternative to /*.dat as a definition of all dat files, would be /?*.dat&lt;BR /&gt;
Separating / and * with ? should not reduce the selection of files selected but will remove that troublesome /* combination&lt;BR /&gt;
 &lt;BR /&gt;
peterC</description>
      <pubDate>Thu, 12 Nov 2009 13:46:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-a-macro-variable-with-quot-dat-quot-in-the-string/m-p/66243#M14388</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2009-11-12T13:46:58Z</dc:date>
    </item>
  </channel>
</rss>

