<?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 protecting the password in proc sql in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/protecting-the-password-in-proc-sql/m-p/23367#M5151</link>
    <description>Hi,&lt;BR /&gt;
   While using the proc sql statement to connect the sas to oracle,it is needed to enter the user id and password.My question is i don't want to display the password in the code, is there any way to do that.&lt;BR /&gt;
&lt;BR /&gt;
eg:  proc sql;&lt;BR /&gt;
connect to oracle (user= password= path=);&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
  Thanks in advance</description>
    <pubDate>Thu, 05 Jun 2008 11:04:53 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-06-05T11:04:53Z</dc:date>
    <item>
      <title>protecting the password in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/protecting-the-password-in-proc-sql/m-p/23367#M5151</link>
      <description>Hi,&lt;BR /&gt;
   While using the proc sql statement to connect the sas to oracle,it is needed to enter the user id and password.My question is i don't want to display the password in the code, is there any way to do that.&lt;BR /&gt;
&lt;BR /&gt;
eg:  proc sql;&lt;BR /&gt;
connect to oracle (user= password= path=);&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
  Thanks in advance</description>
      <pubDate>Thu, 05 Jun 2008 11:04:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/protecting-the-password-in-proc-sql/m-p/23367#M5151</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-06-05T11:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: protecting the password in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/protecting-the-password-in-proc-sql/m-p/23368#M5152</link>
      <description>I am new in SAS&lt;BR /&gt;
what does this statement do?&lt;BR /&gt;
&lt;BR /&gt;
connect to oracle (user= password= path=);&lt;BR /&gt;
&lt;BR /&gt;
Does it ask for the prompt to enter the user name and password?</description>
      <pubDate>Thu, 05 Jun 2008 13:34:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/protecting-the-password-in-proc-sql/m-p/23368#M5152</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-06-05T13:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: protecting the password in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/protecting-the-password-in-proc-sql/m-p/23369#M5153</link>
      <description>Are you using EG4?  You can make your password a macro variable and use the parameter manager to prompt you for a password everytime you run the code. This will result in the password showing up in your log, but that is easier to clear than your code.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Rkmalkani, it is a code to connect to a secured server.  You need to enter a username and password to the code before it will work. Keeping it blank does not make it prompt for me.

Message was edited by: rab24</description>
      <pubDate>Thu, 05 Jun 2008 14:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/protecting-the-password-in-proc-sql/m-p/23369#M5153</guid>
      <dc:creator>rab24</dc:creator>
      <dc:date>2008-06-05T14:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: protecting the password in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/protecting-the-password-in-proc-sql/m-p/23370#M5154</link>
      <description>&amp;gt; Hi,&lt;BR /&gt;
&amp;gt; While using the proc sql statement to connect the&lt;BR /&gt;
&amp;gt; sas to oracle,it is needed to enter the user id and&lt;BR /&gt;
&amp;gt; password.My question is i don't want to display the&lt;BR /&gt;
&amp;gt;  password in the code, is there any way to do that.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; eg:  proc sql;&lt;BR /&gt;
&amp;gt; connect to oracle (user= password= path=);&lt;BR /&gt;
&amp;gt; quit;&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;   Thanks in advance&lt;BR /&gt;
&lt;BR /&gt;
Is the PWENCODE proc available to you to encrypt your password and then it can be read in by your PROC SQL code?&lt;BR /&gt;
&lt;BR /&gt;
Best Regards,&lt;BR /&gt;
Gil.</description>
      <pubDate>Thu, 05 Jun 2008 15:16:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/protecting-the-password-in-proc-sql/m-p/23370#M5154</guid>
      <dc:creator>HoustonGSC</dc:creator>
      <dc:date>2008-06-05T15:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: protecting the password in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/protecting-the-password-in-proc-sql/m-p/23371#M5155</link>
      <description>There are two different methods that come to mind&lt;BR /&gt;
&lt;BR /&gt;
1)  Define a macro variable with %let statements in an external file  and %include the file in my batch code.  (security through obscurity)&lt;BR /&gt;
&lt;BR /&gt;
IE In an external file...&lt;BR /&gt;
&lt;BR /&gt;
%let pw = mypassword;&lt;BR /&gt;
%let uid = myuserid;&lt;BR /&gt;
&lt;BR /&gt;
In batch code&lt;BR /&gt;
proc sql;&lt;BR /&gt;
connect to oracle (user=&amp;amp;uid password=&amp;amp;pw path=);&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
2)  Use Proc PWENCODE to encode the password and substitute the encoded password into the procedure. See the base SAS procedures documentation.&lt;BR /&gt;
Basically, you can use proc pwencode to write an encoded password to an external file.  You can then use a data _null_ step to read the password and create a macro variable the you use in a similar way in method 1.&lt;BR /&gt;
&lt;BR /&gt;
Linda</description>
      <pubDate>Thu, 05 Jun 2008 15:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/protecting-the-password-in-proc-sql/m-p/23371#M5155</guid>
      <dc:creator>LAP</dc:creator>
      <dc:date>2008-06-05T15:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: protecting the password in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/protecting-the-password-in-proc-sql/m-p/23372#M5156</link>
      <description>I collected the encoded pw using PROC PWENCODE but hoped to hide my password from the stored log by using the NOSOURCE option.&lt;BR /&gt;
"Lazy" is not clever in SAS programming.[pre]&lt;BR /&gt;
option nosource ;  proc pwencode in='my password' ; run; option source ;&lt;BR /&gt;
[/pre] &lt;BR /&gt;
still revealed the procedure syntax. &lt;BR /&gt;
 &lt;BR /&gt;
It seems like the NOSOURCE option only takes affect after the line in which it is found, and not immediately after its statement. Here is a log snippet showing the effect of puting all the code on one line like the above [pre]&lt;BR /&gt;
454  option nosource ;&lt;BR /&gt;
454!                  proc pwencode in='my password' ; run;&lt;BR /&gt;
 &lt;BR /&gt;
{sas001}bXkgcGFzc3dvcmQ=&lt;BR /&gt;
 &lt;BR /&gt;
NOTE: PROCEDURE PWENCODE used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
 &lt;BR /&gt;
454!                                                        o&lt;BR /&gt;
 &lt;BR /&gt;
454!                                                         ption source ;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
When the option NOSOURCE is on a separate line, the syntax of the following lines are not displayed (until the line with option SOURCE).&lt;BR /&gt;
 &lt;BR /&gt;
I won't make that mistake again &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;
 &lt;BR /&gt;
PeterC</description>
      <pubDate>Mon, 02 Mar 2009 15:34:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/protecting-the-password-in-proc-sql/m-p/23372#M5156</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-02T15:34:29Z</dc:date>
    </item>
  </channel>
</rss>

