<?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: sas quote function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578480#M164083</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259823"&gt;@rohitkrishna&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi KurtBremser,&lt;BR /&gt;thanks for the quick replay &amp;amp; below the details of the above code results&lt;BR /&gt;{&lt;BR /&gt;DATA _LIC;&lt;BR /&gt;X = 'STRING';&lt;BR /&gt;Y = QUOTE(X,"'");&lt;BR /&gt;RUN;&lt;BR /&gt;PROC PRINT DATA = _LIC;&lt;BR /&gt;RUN; }&lt;BR /&gt;&lt;BR /&gt;and the results are&lt;BR /&gt;Obs X Y&lt;BR /&gt;&lt;BR /&gt;1 STRING "STRING"&lt;BR /&gt;&lt;BR /&gt;again I am getting double quotes only&lt;BR /&gt;&lt;BR /&gt;thanks &amp;amp; regards&lt;BR /&gt;rohit&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why does your code have { } around the SAS code?&lt;/P&gt;
&lt;P&gt;On a windows machine the result is also:&lt;/P&gt;
&lt;PRE&gt;Obs      X          Y

 1     STRING    'STRING'
&lt;/PRE&gt;</description>
    <pubDate>Thu, 01 Aug 2019 15:40:23 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-08-01T15:40:23Z</dc:date>
    <item>
      <title>sas quote function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578292#M163984</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;i'm not able to print a single quote for one of my variables I tried with different types like&amp;nbsp; catt, quote(id,"'") but it gives the double quote's only so please suggest some solution for the problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;DATA _LIC;&lt;BR /&gt;INFILE DATALINES;&lt;BR /&gt;INPUT @1 ID 1. @3 LIC $10.;&lt;BR /&gt;DATALINES;&lt;BR /&gt;1 24356578&lt;BR /&gt;2 42437254&lt;BR /&gt;3 36353239&lt;BR /&gt;4 25242762&lt;BR /&gt;5 26525326&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;BR /&gt;DATA _LIC2;&lt;BR /&gt;SET _LIC;&lt;BR /&gt;ID_NEQ = QUOTE("'",LIC,"'");&lt;BR /&gt;RUN;&lt;BR /&gt;PROC PRINT DATA = _LIC2;&lt;BR /&gt;RUN; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;expecting results should be like : ('24356578') not like ("24356578")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; reagrds&amp;nbsp;&lt;/P&gt;&lt;P&gt;rohit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 08:17:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578292#M163984</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2019-08-01T08:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: sas quote function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578294#M163985</link>
      <description>&lt;P&gt;Maxim 1: Read the Documentation.&lt;/P&gt;
&lt;P&gt;In this case, the documentation for the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p059exu866hqw2n0zw9aoxf3p6oj.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;Quote Function&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Excerpt:&lt;/P&gt;
&lt;H4 class="xis-argument"&gt;&lt;SPAN class="xis-userSuppliedValue"&gt;argument-2&lt;/SPAN&gt;&lt;/H4&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;P class="xis-paraSimpleFirst"&gt;specifies a quoting character, which is a single or double quotation mark. Other characters are ignored and the double quotation mark is used. The double quotation mark is the default.&lt;/P&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that the quote() function will only accept TWO arguments. The ERROR in your log (Maxim 2!) tells you that.&lt;/P&gt;
&lt;P&gt;So this gives you your result:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
x1 = 'string';
x2 = quote(x1,"'");
run;

proc print data=test noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;  x1         x2

string    'string'
&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Aug 2019 08:27:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578294#M163985</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-01T08:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: sas quote function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578295#M163986</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you read the log, you will see that your program produces an error :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;10   ;
11   RUN;
12   DATA _LIC2;
13   SET _LIC;
14   ID_NEQ = QUOTE("'",LIC,"'");
              -----
              72
ERROR 72-185: The QUOTE function call has too many arguments.

15   RUN;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Indeed, according to the documentatiopn, the quote function has two arguments :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="xis-syntaxSimple"&gt;
&lt;DIV class="xis-syntaxLevel"&gt;&lt;SPAN class="xis-keyword"&gt;QUOTE&lt;/SPAN&gt;(&lt;SPAN class="xis-userSuppliedSyntaxValue"&gt;&lt;A class="ng-scope" tabindex="0" title="Description of syntax: “argument-1”" href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p059exu866hqw2n0zw9aoxf3p6oj.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n0hh09kor9zhtln1pltsckm75ymb" data-docset-id="lefunctionsref" data-docset-version="9.4" data-original-href="p059exu866hqw2n0zw9aoxf3p6oj.htm#n0hh09kor9zhtln1pltsckm75ymb"&gt;argument-1&lt;/A&gt;&lt;/SPAN&gt;, &lt;SPAN class="xis-userSuppliedSyntaxValue"&gt;&lt;A class="ng-scope" tabindex="0" title="Description of syntax: “argument-2”" href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p059exu866hqw2n0zw9aoxf3p6oj.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n0d5oni3p8gupmn16mnc5r2hfgvp" data-docset-id="lefunctionsref" data-docset-version="9.4" data-original-href="p059exu866hqw2n0zw9aoxf3p6oj.htm#n0d5oni3p8gupmn16mnc5r2hfgvp"&gt;argument-2&lt;/A&gt;&lt;/SPAN&gt;)&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="xis-syntaxDescription"&gt;
&lt;DIV class="xis-requiredArgGroup"&gt;
&lt;H3 id="n1vywk4m78yujun17228sj1t9ui1" class="xis-title"&gt;Required Arguments&lt;/H3&gt;
&lt;DIV id="n0hh09kor9zhtln1pltsckm75ymb" class="xis-argDescriptionPair"&gt;
&lt;H4 class="xis-argument"&gt;&lt;SPAN class="xis-userSuppliedValue"&gt;argument-1&lt;/SPAN&gt;&lt;/H4&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;P class="xis-paraSimpleFirst"&gt;specifies a character constant, variable, or expression.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="n0d5oni3p8gupmn16mnc5r2hfgvp" class="xis-argDescriptionPair"&gt;
&lt;H4 class="xis-argument"&gt;&lt;SPAN class="xis-userSuppliedValue"&gt;argument-2&lt;/SPAN&gt;&lt;/H4&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;P class="xis-paraSimpleFirst"&gt;specifies a quoting character, which is a single or double quotation mark. Other characters are ignored and the double quotation mark is used. The double quotation mark is the default.&lt;/P&gt;
&lt;P class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xis-paraSimpleFirst"&gt;=&amp;gt; Replace your call to quote function with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ID_NEQ = QUOTE(LIC,"'");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 01 Aug 2019 08:27:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578295#M163986</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2019-08-01T08:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: sas quote function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578305#M163990</link>
      <description>Hi KurtBremser,&lt;BR /&gt;thanks for the quick replay &amp;amp; below the details of the above code results&lt;BR /&gt;{&lt;BR /&gt;DATA _LIC;&lt;BR /&gt;X = 'STRING';&lt;BR /&gt;Y = QUOTE(X,"'");&lt;BR /&gt;RUN;&lt;BR /&gt;PROC PRINT DATA = _LIC;&lt;BR /&gt;RUN; }&lt;BR /&gt;&lt;BR /&gt;and the results are&lt;BR /&gt;Obs X Y&lt;BR /&gt;&lt;BR /&gt;1 STRING "STRING"&lt;BR /&gt;&lt;BR /&gt;again I am getting double quotes only&lt;BR /&gt;&lt;BR /&gt;thanks &amp;amp; regards&lt;BR /&gt;rohit</description>
      <pubDate>Thu, 01 Aug 2019 09:23:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578305#M163990</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2019-08-01T09:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: sas quote function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578307#M163992</link>
      <description>&lt;P&gt;This is strange, and I fear you have a "mainframe problem".&lt;/P&gt;
&lt;P&gt;Your code, run on SAS 9.4 on AIX, creates single quotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since there is no mention in the documentation of special behavior of this function on mainframes, I would bring this to the attention of SAS technical support.&lt;/P&gt;
&lt;P&gt;I also did not find anything regarding the quote() function in the Companion for Z/OS.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 09:36:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578307#M163992</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-01T09:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: sas quote function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578311#M163994</link>
      <description>&lt;P&gt;No problem with SAS 9.4m5 on Windoze.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: Which version are you using?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 09:51:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578311#M163994</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-08-01T09:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: sas quote function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578326#M164002</link>
      <description>Hi andreas_lds,&lt;BR /&gt;thanks for the quick replay&lt;BR /&gt;the current version i'm using 8.1&lt;BR /&gt;&lt;BR /&gt;thanks &amp;amp; regards&lt;BR /&gt;rohit</description>
      <pubDate>Thu, 01 Aug 2019 10:37:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578326#M164002</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2019-08-01T10:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: sas quote function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578328#M164004</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259823"&gt;@rohitkrishna&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi andreas_lds,&lt;BR /&gt;thanks for the quick replay&lt;BR /&gt;the current version i'm using 8.1&lt;BR /&gt;&lt;BR /&gt;thanks &amp;amp; regards&lt;BR /&gt;rohit&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So you're calling from 2003 or so via time-machine?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;8.1 is the subject of IT archaeologists, as it was introduced in 2001 and must have been taken off support in 2008 (IIRC) when 9.2 was introduced.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm astonished that SAS still hands out licenses for this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have your SAS admins upgrade to the current versions 10 years before yesterday. What they've been doing can be considered as gross negligence.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you're current, we can test again, and if the issue persists, involve SAS TS right then. But with 8.1, they only thing you'll hear from them is "upgrade to the current version".&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 10:55:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578328#M164004</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-01T10:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: sas quote function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578411#M164039</link>
      <description>Hi KurtBremser,&lt;BR /&gt;thanks for the replay&lt;BR /&gt;ya this has the oldest project we are working&lt;BR /&gt;so what is the solution for the above issue&lt;BR /&gt;thanks &amp;amp; regards&lt;BR /&gt;rohit&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Aug 2019 13:59:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578411#M164039</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2019-08-01T13:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: sas quote function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578413#M164040</link>
      <description>&lt;P&gt;If you are really running a version of SAS that was released almost 20 years ago then use functions that work in that version.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA _LIC;
  INFILE DATALINES;
  INPUT @1 ID 1. @3 LIC $10.;
DATALINES;
1 24356578
2 42437254
3 36353239
4 25242762
5 26525326
;
RUN;
DATA _LIC2;
  SET _LIC;
  length ID_NEQ $12;
  ID_NEQ = "'" || trim(LIC) || "'";
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Aug 2019 14:05:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578413#M164040</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-01T14:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: sas quote function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578431#M164056</link>
      <description>Hi Tom,&lt;BR /&gt;thanks for the quick replay&lt;BR /&gt;it superb it's working&lt;BR /&gt;thanks &amp;amp; regards&lt;BR /&gt;rohit&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Aug 2019 14:32:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578431#M164056</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2019-08-01T14:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: sas quote function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578480#M164083</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259823"&gt;@rohitkrishna&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi KurtBremser,&lt;BR /&gt;thanks for the quick replay &amp;amp; below the details of the above code results&lt;BR /&gt;{&lt;BR /&gt;DATA _LIC;&lt;BR /&gt;X = 'STRING';&lt;BR /&gt;Y = QUOTE(X,"'");&lt;BR /&gt;RUN;&lt;BR /&gt;PROC PRINT DATA = _LIC;&lt;BR /&gt;RUN; }&lt;BR /&gt;&lt;BR /&gt;and the results are&lt;BR /&gt;Obs X Y&lt;BR /&gt;&lt;BR /&gt;1 STRING "STRING"&lt;BR /&gt;&lt;BR /&gt;again I am getting double quotes only&lt;BR /&gt;&lt;BR /&gt;thanks &amp;amp; regards&lt;BR /&gt;rohit&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why does your code have { } around the SAS code?&lt;/P&gt;
&lt;P&gt;On a windows machine the result is also:&lt;/P&gt;
&lt;PRE&gt;Obs      X          Y

 1     STRING    'STRING'
&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Aug 2019 15:40:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-quote-function/m-p/578480#M164083</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-01T15:40:23Z</dc:date>
    </item>
  </channel>
</rss>

