<?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 &amp;quot;call symput&amp;quot; for a string with &amp;quot; ' &amp;quot;? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/quot-call-symput-quot-for-a-string-with-quot-quot/m-p/127701#M26082</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to use "call symput" do the following step,&lt;/P&gt;&lt;P&gt;I want to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;call symput("test_name", "Kid's First Test");&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;test1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I don't think in my code the "call symput" can deal with a string with a " ' ".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Any help? thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Mar 2013 17:31:59 GMT</pubDate>
    <dc:creator>Ken_oy</dc:creator>
    <dc:date>2013-03-05T17:31:59Z</dc:date>
    <item>
      <title>"call symput" for a string with " ' "?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-call-symput-quot-for-a-string-with-quot-quot/m-p/127701#M26082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to use "call symput" do the following step,&lt;/P&gt;&lt;P&gt;I want to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;call symput("test_name", "Kid's First Test");&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;test1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I don't think in my code the "call symput" can deal with a string with a " ' ".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Any help? thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2013 17:31:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-call-symput-quot-for-a-string-with-quot-quot/m-p/127701#M26082</guid>
      <dc:creator>Ken_oy</dc:creator>
      <dc:date>2013-03-05T17:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: "call symput" for a string with " ' "?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-call-symput-quot-for-a-string-with-quot-quot/m-p/127702#M26083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Actually, CALL SYMPUT doesn't mind the unmatched single quote (since it is inside double quotes).&amp;nbsp; But it cause problems for the %PUT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you wrote&lt;/P&gt;&lt;P&gt;&amp;nbsp; %put Kid's First Test ;&lt;/P&gt;&lt;P&gt;That apostrophe would look to SAS like an unmatched single quote, and cause problems.&lt;/P&gt;&lt;P&gt;When &amp;amp;test_name resolves to that value, the single quote causes the same problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To avoid the problems, you mask the apostrophe by using macro quoting functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp; %put %bquote(&amp;amp;test_name)&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp; %put %superq(test_name) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;--Q.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2013 17:41:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-call-symput-quot-for-a-string-with-quot-quot/m-p/127702#M26083</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2013-03-05T17:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: "call symput" for a string with " ' "?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quot-call-symput-quot-for-a-string-with-quot-quot/m-p/127703#M26084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When the text is resolved you need to be sure that text does not cause errors.&amp;nbsp; Typically that is done with quoting functions %SUPERQ %BQUOTE etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2013 17:42:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quot-call-symput-quot-for-a-string-with-quot-quot/m-p/127703#M26084</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-03-05T17:42:18Z</dc:date>
    </item>
  </channel>
</rss>

