<?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: Problem with SYMGET in the  CONNECT Statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18290#M2733</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The example in the program is calling the symget function directly in the select statement of the SQL. Does not need to wrap it in a SYSFUNC call.&amp;nbsp; Did you try just removing the %SYSFUNC() wrapper around the SYMGET function calls so that it looks like in the paper you found?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Sep 2011 19:20:05 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2011-09-28T19:20:05Z</dc:date>
    <item>
      <title>Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18284#M2727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue with Symget fucntion&amp;nbsp; i am using the following code to mask my password from displaying in log. I have attached both code and error log to this post. please suggest a way out of this problem. Thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 22:08:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18284#M2727</guid>
      <dc:creator>hari1109</dc:creator>
      <dc:date>2011-09-27T22:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18285#M2728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove the quotes from around the name of the symbol.&amp;nbsp; When using %SYSFUNC() (and macro functions in general) you do not need to put quotes around strings. To the macro processor everything is a string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 22:21:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18285#M2728</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-09-27T22:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18286#M2729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the reply , i tried without quotes as you mentioned but it is not working and i am getting the same error as i have mentioned in the error_log file. quoted were removed for all strings and am geeting the same error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 14:32:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18286#M2729</guid>
      <dc:creator>hari1109</dc:creator>
      <dc:date>2011-09-28T14:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18287#M2730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You do not need to use SYMGET.&amp;nbsp; Just reference the macro variable.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace:&lt;/P&gt;&lt;P&gt;WHERE uid eq %sysfunc(symget('abc_username')) AND pwd eq %sysfunc(symget('abc_password'))&lt;/P&gt;&lt;P&gt;with &lt;/P&gt;&lt;P&gt;WHERE uid eq "&amp;amp;abc_username" AND pwd eq "&amp;amp;abc_password"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note the quotes so that the compiler will see that the terms on the right hand side of the EQ operator are strings and not variable names or constants.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Symget is only useful when running in a data step and you want to get the current value for a macro variable that you might have updated since the data step was compiled by using a CALL SYMPUT statement. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 16:05:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18287#M2730</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-09-28T16:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18288#M2731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This paper describes about masking your password.&lt;/P&gt;&lt;P&gt;&lt;CITE&gt;support.&lt;STRONG&gt;sas&lt;/STRONG&gt;.com/resources/papers/proceedings09/013-2009.pdf&lt;/CITE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 16:35:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18288#M2731</guid>
      <dc:creator>vrmkool</dc:creator>
      <dc:date>2011-09-28T16:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18289#M2732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the suggestions yeah if i mean if i&amp;nbsp; replace the where statement as you mentioned the macro variables will get resolved but when you use some options like symbolgen mprint and mlogic in your code these password values will get exspodes in the sas log and that is i why i am trying to mask those variables using SYMGET function. i came across this in the paper mentioned below ﻿ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿﻿&lt;/P&gt;&lt;P&gt;﻿ &lt;/P&gt;&lt;P&gt;﻿&lt;A href="http://support.sas.com/resources/papers/proceedings09/013-2009.pdf"&gt;http://support.sas.com/resources/papers/proceedings09/013-2009.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 18:58:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18289#M2732</guid>
      <dc:creator>hari1109</dc:creator>
      <dc:date>2011-09-28T18:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18290#M2733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The example in the program is calling the symget function directly in the select statement of the SQL. Does not need to wrap it in a SYSFUNC call.&amp;nbsp; Did you try just removing the %SYSFUNC() wrapper around the SYMGET function calls so that it looks like in the paper you found?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 19:20:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18290#M2733</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-09-28T19:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18291#M2734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Tom i tried without the %SYSFUNC fucntion but it didn't work. The reason why i used is i looked into this link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/Talk:Secret_Sequel:_Keeping_Your_Password_Away_from_the_LOG"&gt;http://www.sascommunity.org/wiki/Talk:Secret_Sequel:_Keeping_Your_Password_Away_from_the_LOG&lt;/A&gt;&amp;nbsp;&amp;nbsp; and i thought it would work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 19:42:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18291#M2734</guid>
      <dc:creator>hari1109</dc:creator>
      <dc:date>2011-09-28T19:42:09Z</dc:date>
    </item>
    <item>
      <title>Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18292#M2735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are you connecting to when running the query?&amp;nbsp; For example, if you are connecting to oracle the query would not work becuase the character strings you are trying to pass the where clause are not encased in single quotes.&amp;nbsp; Try doing this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let user=user;&lt;/P&gt;&lt;P&gt;%let pass=pass;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call symput('user',"'"||"&amp;amp;user"||"'");&lt;/P&gt;&lt;P&gt; call symput('pass',"'"||"&amp;amp;pass"||"'");&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; connect to oracle user=&amp;amp;user pass=&amp;amp;pass path=mypath;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; create table want as select * from connection to oracle&lt;/P&gt;&lt;P&gt;&amp;nbsp; ( select * &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from mytable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where uid=&amp;amp;user and pwd=&amp;amp;pass );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; disconnect from oracle;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 20:02:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18292#M2735</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2011-09-28T20:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18293#M2736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi FriedEgg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you I can use what you have told but i am trying to hide the password away from the SAS log. For example if is use the above code with options such as Symbolgen, mprint and mlogic then what ever the password i am using in the connect statement will get exsposed. So to avoid that i am using Symget fuction which i have seen in a document &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt; &lt;A class="jive-link-external-small" href="http://support.sas.com/resources/papers/proceedings09/013-2009.pdf"&gt;http://support.sas.com/resources/papers/proceedings09/013-2009.pdf&lt;/A&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 20:14:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18293#M2736</guid>
      <dc:creator>hari1109</dc:creator>
      <dc:date>2011-09-28T20:14:48Z</dc:date>
    </item>
    <item>
      <title>Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18294#M2737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When SYMGET is executing on the remote host and the macro variable was created in the local SAS session, the macro variable you are attempting to retrieve probably does not exist in the remote host symbol table.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Check out &lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a001221974.htm"&gt;%SYSLPUT&lt;/A&gt; and &lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a000208981.htm"&gt;%SYSRPUT.&lt;/A&gt;&amp;nbsp; These statments allow passing macro values between local and remote host, and may help resolve your problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 20:48:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18294#M2737</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2011-09-28T20:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18295#M2738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I forgot that one piece. During the call of &amp;amp;amp;user or &amp;amp;amp;pass you can replace with %sysfunc(symget(user)) etc. However all methods will still show masked data in the log if certain suboptions of sastrace are used. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options mlogic mprint macrogen symbolgen;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input (uid pwd) ($);&lt;/P&gt;&lt;P&gt;&amp;nbsp; call symput('user',"'"||uid||"'");&lt;/P&gt;&lt;P&gt;&amp;nbsp; call symput('pass',"'"||pwd||"'");&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;a1 abcde&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options nosymbolgen;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; connect to oracle user=&amp;amp;user /* or %sysfunc(symget(user)) */ pass=&amp;amp;pass /* or %sysfunc(symget(pass)) */ path=mypath;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create table want as select * from connection to oracle&lt;/P&gt;&lt;P&gt;&amp;nbsp; ( select * &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from mytable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where uid=&amp;amp;user /* or %sysfunc(symget(user)) */ and pwd=&amp;amp;pass /* or %sysfunc(symget(pass)) */);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;disconnect from oracle;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;options symbolgen;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do believe that any method of masking will be foiled by utilizing the sastrace option for any of it's routines that return submitted SQL statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a000433982.htm"&gt;http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a000433982.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 20:50:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18295#M2738</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2011-09-28T20:50:28Z</dc:date>
    </item>
    <item>
      <title>Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18296#M2739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The %syslput and %sysrput are for sharing variables between mp-connect processes.&amp;nbsp; Which I do not think the op is using?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 20:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18296#M2739</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2011-09-28T20:59:15Z</dc:date>
    </item>
    <item>
      <title>Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18297#M2740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A better way to hide passwords is to encrypt them like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10pt; color: navy; font-family: 'Courier New'; background-color: white;"&gt;proc&lt;/SPAN&gt; &lt;SPAN&gt;&lt;SPAN&gt;pwencode&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt; in=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'My password'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;STRONG&gt; &lt;/STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;STRONG&gt;This produces an encrypted string like this: &lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;{sas001}TXkgcGFzc3dvcmQ=&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 8pt; font-family: 'SAS Monospace';"&gt;&lt;STRONG&gt;﻿&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;STRONG&gt;﻿Which you then put into your macro variable or supply directly in a database connect statement:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;﻿&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-size: 9pt; background: white; color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;"&gt;connect&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; background: white; color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; background: white; color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; background: white; color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;"&gt; oracle (user = myuser password = &lt;SPAN style="font-size: 9pt; background: white; color: purple; font-family: 'Courier New';"&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-size: 9pt; font-family: Times New Roman;"&gt;{sas001}TXkgcGFzc3dvcmQ='&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; background: white; color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;"&gt; path=&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; background: white; color: purple; font-family: &amp;amp;quot;Courier New&amp;amp;quot;"&gt;'Mypath' &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; background: white; color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="Courier New&amp;amp;quot: ; color: black; background: white; font-size: 9pt; font-family: &amp;amp;quot;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="Courier New&amp;amp;quot: ; color: black; background: white; font-size: 9pt; font-family: &amp;amp;quot;"&gt;﻿&lt;/SPAN&gt;The advantage is that is doesn't matter if the password appears masked or not, it can't be easily unencrypted. &lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-size: 9pt; background: white; color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-size: 9pt; background: white; color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-size: 9pt; background: white; color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-size: 9pt; background: white; color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-size: 9pt; background: white; color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 21:20:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18297#M2740</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2011-09-28T21:20:28Z</dc:date>
    </item>
    <item>
      <title>Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18298#M2741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This suggesttion will also work well, however if you are going to use it inside a select statement to dbs like oracle you will need another one where the in="'My password'"&amp;nbsp; Also I am pretty sure that certain conditions of the sastrace option will still show the unmasked password.&amp;nbsp; This is just an assumption though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 21:38:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18298#M2741</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2011-09-28T21:38:57Z</dc:date>
    </item>
    <item>
      <title>Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18299#M2742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi SASkiwi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This could be good for one but in my case there are mutiple people who have to connect to the database using pass through facility. That is why am looking for other methods to hide the password from not appearing in the sas log. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 21:52:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18299#M2742</guid>
      <dc:creator>hari1109</dc:creator>
      <dc:date>2011-09-28T21:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18300#M2743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We tried using this, but it does not really solve the problem.&lt;/P&gt;&lt;P&gt;Anyone with access to SAS can use that "encrypted" password to access the database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 21:54:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18300#M2743</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-09-28T21:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18301#M2744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To solve this issue I usually encapsulate the step that uses the password inside of a macro.&lt;/P&gt;&lt;P&gt;That way you can turn off SYMBOLGEN, MLOGIC, MPRINT, MACROGEN while you are expanding the password.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can store the passwords in a dataset or file and restrict access to the file using your operating system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro oracle(passwordfile);&lt;/P&gt;&lt;P&gt;%local userid password optstore;&lt;/P&gt;&lt;P&gt;%let optstore = %sysfunc(getoption(symbolgen)) ;&lt;/P&gt;&lt;P&gt;options nosymbolgen ;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; infile "&amp;amp;passwordfile" ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input userid &amp;amp;$20. password &amp;amp;$20. ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; call symputx('user',userid);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; call symputx('password',password);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; connect to oracle (user="&amp;amp;user" password="&amp;amp;password" path="mydatabase");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options &amp;amp;optstore;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%mend oracle;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 22:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18301#M2744</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-09-28T22:03:16Z</dc:date>
    </item>
    <item>
      <title>Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18302#M2745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At the OS level just ensure that the password file is only readable by the user or group of users who are expected to utilize it, and you have as close to a secure facility as I know how to achieve for a connect statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 22:06:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18302#M2745</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2011-09-28T22:06:56Z</dc:date>
    </item>
    <item>
      <title>Problem with SYMGET in the  CONNECT Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18303#M2746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Agreed Tom, but it does block any use of that password in other non-SAS database tools like TOAD, Oracle client etc. By using encrypted passwords in combination with other security measures, as discussed, you can make it hard enough for all but the most expert of users to crack.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 21:06:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-with-SYMGET-in-the-CONNECT-Statement/m-p/18303#M2746</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2011-09-29T21:06:23Z</dc:date>
    </item>
  </channel>
</rss>

