<?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 proc pwencode issue with single and double quotes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629441#M186138</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;how to mask single and double quotes from my password.&lt;/P&gt;&lt;P&gt;proc pwen code is not working if my password has single and double quotes.&lt;/P&gt;&lt;P&gt;even if I use %str.&lt;/P&gt;&lt;P&gt;%let d=%nrstr(,3xc'wqm_W");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc pwencode in= ",3xc'wqm_W"";
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thanks,&lt;/P&gt;&lt;P&gt;SS&lt;/P&gt;</description>
    <pubDate>Wed, 04 Mar 2020 14:45:47 GMT</pubDate>
    <dc:creator>sathya66</dc:creator>
    <dc:date>2020-03-04T14:45:47Z</dc:date>
    <item>
      <title>proc pwencode issue with single and double quotes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629441#M186138</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;how to mask single and double quotes from my password.&lt;/P&gt;&lt;P&gt;proc pwen code is not working if my password has single and double quotes.&lt;/P&gt;&lt;P&gt;even if I use %str.&lt;/P&gt;&lt;P&gt;%let d=%nrstr(,3xc'wqm_W");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc pwencode in= ",3xc'wqm_W"";
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thanks,&lt;/P&gt;&lt;P&gt;SS&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 14:45:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629441#M186138</guid>
      <dc:creator>sathya66</dc:creator>
      <dc:date>2020-03-04T14:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: proc pwencode issue with single and double quotes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629445#M186140</link>
      <description>&lt;P&gt;Have you tried the usual way?&amp;nbsp; Within double quotes refer to a double quote with an extra double quote character:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc pwencode in= ",3xc'wqm_W""";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Mar 2020 14:51:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629445#M186140</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2020-03-04T14:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: proc pwencode issue with single and double quotes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629446#M186141</link>
      <description>SAS treats the two consecutive quotation marks as one quotation mark.</description>
      <pubDate>Wed, 04 Mar 2020 14:53:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629446#M186141</guid>
      <dc:creator>AnandVyas</dc:creator>
      <dc:date>2020-03-04T14:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: proc pwencode issue with single and double quotes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629451#M186143</link>
      <description>&lt;P&gt;Please show the actual code since what you show is not using the macro variable you created.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you use %STR() or %NRSTR()?&amp;nbsp; I would think you would want %STR() or %BQUOTE() since you have no need to remove the macro quoting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But it is much easier to use normal quoting instead of macro quoting.&amp;nbsp; Just double the embedded quotes. So either of these should work.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;",3xc'wqm_W"""
',3xc''wqm_W"'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or just use the QUOTE() function to add the quotes.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let d=%bquote(,3xc'wqm_W");
proc pwencode in=%qsysfunc(quote(%superq(d)));
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 15:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629451#M186143</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-04T15:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: proc pwencode issue with single and double quotes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629455#M186144</link>
      <description>&lt;P&gt;I tried this but&amp;nbsp; I doubt, will SAS take extra double Quote as a letter or will it mask&amp;nbsp;&amp;nbsp;",3xc'wqm_W"&lt;FONT color="#FF0000"&gt;"&lt;/FONT&gt;"&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 15:23:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629455#M186144</guid>
      <dc:creator>sathya66</dc:creator>
      <dc:date>2020-03-04T15:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: proc pwencode issue with single and double quotes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629457#M186146</link>
      <description>&lt;P&gt;getting below error&lt;BR /&gt;28 %let d=%bquote(,3xc'wqm_W");&lt;BR /&gt;29 proc pwencode in=%qsysfunc(quote(%superq(d)));&lt;BR /&gt;NOTE: Line generated by the macro function "QSYSFUNC".&lt;BR /&gt;29 ",3xc'wqm_W"""&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;76&lt;BR /&gt;ERROR 22-322: Expecting a quoted string.&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;30 run;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 15:27:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629457#M186146</guid>
      <dc:creator>sathya66</dc:creator>
      <dc:date>2020-03-04T15:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: proc pwencode issue with single and double quotes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629461#M186148</link>
      <description>Probably the macro quoting added by %Qsysfunc.&lt;BR /&gt;Use %sysfunc instead.  But in that case I would pass the QUOTE() function a single quote as the second argument so that it generates a string quoted with single quotes. That way any &amp;amp; or % characters in the string will be ignored by the macro processor.&lt;BR /&gt;%sysfunc(quote(%superq(d),%str(%'))&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Mar 2020 15:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629461#M186148</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-04T15:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: proc pwencode issue with single and double quotes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629472#M186152</link>
      <description>&lt;P&gt;SAS uses this syntax everywhere else within the software.&amp;nbsp; There's now reason why PWENCODE should be different.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Within double quotes, consecutive double quotes get treated as a single double quote character.&amp;nbsp; With three double quotes in a row, the first two combined get treated as a double quote character, and the third one ends the quoted string.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 16:15:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/629472#M186152</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2020-03-04T16:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: proc pwencode issue with single and double quotes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/630003#M186453</link>
      <description>Just In-case any non programmer background admin stumbles upon this situation you can use a workaround to get auto generated encoded password.  Create an auth in SMC and add the required credentials as part of that auth. Create a library in SMC using the auth. Once created, right click the library and select display libname statement. This should show the libname with encoded pass.</description>
      <pubDate>Fri, 06 Mar 2020 03:51:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-pwencode-issue-with-single-and-double-quotes/m-p/630003#M186453</guid>
      <dc:creator>AnandVyas</dc:creator>
      <dc:date>2020-03-06T03:51:16Z</dc:date>
    </item>
  </channel>
</rss>

