<?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: put-statement quotations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/put-statement-quotations/m-p/32416#M6263</link>
    <description>The problem is that you want a third type of quote mark.  We only have two, but if we remember that the quote mark surrounding the entire string is really a character used by the parser to designate the string itself, we can take advantage of the parsing process. &lt;BR /&gt;
&lt;BR /&gt;
Surround the whole string with single quotes, as you have already done.  Then change each interior single quote to two single quotes (not a double quote - hard to distinguish here).  This forces the parser to take a second pass.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data _null_;&lt;BR /&gt;
x = '&amp;lt; \a href="javascript:window.external.AddFavorite(''http://www.sas.com'', ''Portal'')" style="font-size:12px;color:black;font-family:verdana;"&amp;gt;Click here&amp;lt;\a&amp;gt;';&lt;BR /&gt;
put x=;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
This technique, and its variants, allows you even more than three levels of quoting.</description>
    <pubDate>Tue, 08 Jun 2010 03:34:18 GMT</pubDate>
    <dc:creator>ArtC</dc:creator>
    <dc:date>2010-06-08T03:34:18Z</dc:date>
    <item>
      <title>put-statement quotations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/put-statement-quotations/m-p/32415#M6262</link>
      <description>What quotation marks should I use to put this line of code in a put-statement?&lt;BR /&gt;
&lt;BR /&gt;
&amp;lt; \a href="javascript:window.external.AddFavorite('http://www.sas.com', 'Portal')" style="font-size:12px;color:black;font-family:verdana;"&amp;gt;Click here&amp;lt;\a&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
I would like to have something like this:&lt;BR /&gt;
put '&amp;lt;\a href="javascript:window.external.AddFavorite('http://www.sas.com', 'Portal')" style="font-size:12px;color:black;font-family:verdana;"&amp;gt;Click here&amp;lt;\a&amp;gt;';&lt;BR /&gt;
&lt;BR /&gt;
Thank you.</description>
      <pubDate>Mon, 07 Jun 2010 22:49:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/put-statement-quotations/m-p/32415#M6262</guid>
      <dc:creator>gzr2mz39</dc:creator>
      <dc:date>2010-06-07T22:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: put-statement quotations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/put-statement-quotations/m-p/32416#M6263</link>
      <description>The problem is that you want a third type of quote mark.  We only have two, but if we remember that the quote mark surrounding the entire string is really a character used by the parser to designate the string itself, we can take advantage of the parsing process. &lt;BR /&gt;
&lt;BR /&gt;
Surround the whole string with single quotes, as you have already done.  Then change each interior single quote to two single quotes (not a double quote - hard to distinguish here).  This forces the parser to take a second pass.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data _null_;&lt;BR /&gt;
x = '&amp;lt; \a href="javascript:window.external.AddFavorite(''http://www.sas.com'', ''Portal'')" style="font-size:12px;color:black;font-family:verdana;"&amp;gt;Click here&amp;lt;\a&amp;gt;';&lt;BR /&gt;
put x=;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
This technique, and its variants, allows you even more than three levels of quoting.</description>
      <pubDate>Tue, 08 Jun 2010 03:34:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/put-statement-quotations/m-p/32416#M6263</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-06-08T03:34:18Z</dc:date>
    </item>
  </channel>
</rss>

