<?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 String variable containing single and double quotation marks. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/String-variable-containing-single-and-double-quotation-marks/m-p/71372#M15452</link>
    <description>I want the string variable fstring1 to be:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;'[select("r1c1:r10c1")]'&lt;/B&gt;. &lt;B&gt;All&lt;/B&gt; quotation marks belong to the string.&lt;BR /&gt;
&lt;BR /&gt;
The numeric variable lastrow has the value 10.&lt;BR /&gt;
&lt;BR /&gt;
This expression doesn't work:&lt;BR /&gt;
&lt;BR /&gt;
fstring1=&lt;B&gt;"'[select("r1c1:r" || strip(put(lastrow,3.0)) || "c1")]'"&lt;/B&gt;.&lt;BR /&gt;
&lt;BR /&gt;
In the expression I am trying to concatenate the 3 strings:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;'[select("r1c1:r&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;strip(put(lastrow,3.0))&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;c1")]'&lt;/B&gt;.&lt;BR /&gt;
&lt;BR /&gt;
Any suggestions?</description>
    <pubDate>Fri, 26 Mar 2010 09:28:11 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-03-26T09:28:11Z</dc:date>
    <item>
      <title>String variable containing single and double quotation marks.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/String-variable-containing-single-and-double-quotation-marks/m-p/71372#M15452</link>
      <description>I want the string variable fstring1 to be:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;'[select("r1c1:r10c1")]'&lt;/B&gt;. &lt;B&gt;All&lt;/B&gt; quotation marks belong to the string.&lt;BR /&gt;
&lt;BR /&gt;
The numeric variable lastrow has the value 10.&lt;BR /&gt;
&lt;BR /&gt;
This expression doesn't work:&lt;BR /&gt;
&lt;BR /&gt;
fstring1=&lt;B&gt;"'[select("r1c1:r" || strip(put(lastrow,3.0)) || "c1")]'"&lt;/B&gt;.&lt;BR /&gt;
&lt;BR /&gt;
In the expression I am trying to concatenate the 3 strings:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;'[select("r1c1:r&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;strip(put(lastrow,3.0))&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;c1")]'&lt;/B&gt;.&lt;BR /&gt;
&lt;BR /&gt;
Any suggestions?</description>
      <pubDate>Fri, 26 Mar 2010 09:28:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/String-variable-containing-single-and-double-quotation-marks/m-p/71372#M15452</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-26T09:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: String variable containing single and double quotation marks.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/String-variable-containing-single-and-double-quotation-marks/m-p/71373#M15453</link>
      <description>Try this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
"[select(""r1c1:r" || strip(put(lastrow,3.0)) || "c1"")]"&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Double every double quotes you wish to be represented within the string.&lt;BR /&gt;
&lt;BR /&gt;
Same rule applies for sinqle quotes.&lt;BR /&gt;
&lt;BR /&gt;
Cheers from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos @ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
      <pubDate>Fri, 26 Mar 2010 10:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/String-variable-containing-single-and-double-quotation-marks/m-p/71373#M15453</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2010-03-26T10:30:41Z</dc:date>
    </item>
  </channel>
</rss>

