<?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: quote string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/quote-string/m-p/314631#M68564</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz﻿&lt;/a&gt;&amp;nbsp;Thank you. I was asking this question in reference to use of variable in CALL EXECUTE routine. In example below, memname is not treated as literal.&lt;/P&gt;&lt;PRE&gt;data _null_;
	set _dsets_;
	call execute
		(
		'proc print data=sugi30.' ||
		trim(memname) ||
		'(obs=50); title ''First 50 observations of data set ' ||
		trim(memname) || '''; run;'
			);
run;&lt;/PRE&gt;</description>
    <pubDate>Sun, 27 Nov 2016 18:14:45 GMT</pubDate>
    <dc:creator>SAS_inquisitive</dc:creator>
    <dc:date>2016-11-27T18:14:45Z</dc:date>
    <item>
      <title>quote string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quote-string/m-p/314627#M68560</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder why this does not add double quotes to name string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data _null_;
  set sashelp.class;
  put name;
run;

data _null_;
  set sashelp.class;
  put "||name||";
run;&lt;/PRE&gt;</description>
      <pubDate>Sun, 27 Nov 2016 17:48:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quote-string/m-p/314627#M68560</guid>
      <dc:creator>SAS_inquisitive</dc:creator>
      <dc:date>2016-11-27T17:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: quote string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quote-string/m-p/314629#M68562</link>
      <description>&lt;P&gt;You surround the expression&lt;/P&gt;
&lt;P&gt;&amp;nbsp; || name ||&lt;/P&gt;
&lt;P&gt;by quotes, which means sas willl treat it as a literal to be written by your put statemet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;put name $quote10. ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which applies the $quote format&amp;nbsp; to name. Since name is 8&amp;nbsp; bytes, I&amp;nbsp; use 10 as the size attribute of the $quote format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2016 18:05:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quote-string/m-p/314629#M68562</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2016-11-27T18:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: quote string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quote-string/m-p/314631#M68564</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz﻿&lt;/a&gt;&amp;nbsp;Thank you. I was asking this question in reference to use of variable in CALL EXECUTE routine. In example below, memname is not treated as literal.&lt;/P&gt;&lt;PRE&gt;data _null_;
	set _dsets_;
	call execute
		(
		'proc print data=sugi30.' ||
		trim(memname) ||
		'(obs=50); title ''First 50 observations of data set ' ||
		trim(memname) || '''; run;'
			);
run;&lt;/PRE&gt;</description>
      <pubDate>Sun, 27 Nov 2016 18:14:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quote-string/m-p/314631#M68564</guid>
      <dc:creator>SAS_inquisitive</dc:creator>
      <dc:date>2016-11-27T18:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: quote string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/quote-string/m-p/314646#M68568</link>
      <description>&lt;P&gt;If you're trying to put quotes around the memname when it appears in the title, then use the put function, with $quote as 2nd argument, in the place where the variable&amp;nbsp;memname appears in the title statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="SAS Monospace"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="SAS Monospace"&gt;_null_&lt;/FONT&gt;&lt;FONT face="SAS Monospace"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="SAS Monospace"&gt;&lt;FONT color="#0000ff" face="SAS Monospace"&gt;&amp;nbsp; set&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="SAS Monospace"&gt; _dsets_;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="SAS Monospace"&gt;&lt;FONT color="#0000ff" face="SAS Monospace"&gt;&amp;nbsp; call&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="SAS Monospace"&gt; execute&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800080" face="SAS Monospace"&gt;&lt;FONT color="#800080" face="SAS Monospace"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'proc print data=sugi30.'&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="SAS Monospace"&gt; ||&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trim(memname) ||&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#800080" face="SAS Monospace"&gt;&lt;FONT color="#800080" face="SAS Monospace"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'(obs=50); title ''First 50 observations of data set '&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="SAS Monospace"&gt; ||&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;&lt;STRONG&gt;put(memname,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="SAS Monospace"&gt;&lt;FONT color="#008080" face="SAS Monospace"&gt;$quote10.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;FONT face="SAS Monospace"&gt;&lt;EM&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/EM&gt; || &lt;/FONT&gt;&lt;FONT color="#800080" face="SAS Monospace"&gt;&lt;FONT color="#800080" face="SAS Monospace"&gt;'''; run;'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) ;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="SAS Monospace"&gt;&lt;FONT color="#000080" face="SAS Monospace"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="SAS Monospace"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2016 19:05:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/quote-string/m-p/314646#M68568</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2016-11-27T19:05:25Z</dc:date>
    </item>
  </channel>
</rss>

