<?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 Hiding a Variable from the Log with Underscores ... Almost Works in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692676#M87823</link>
    <description>&lt;P&gt;At the recent JMP Summit I was asking developers about how I could hide a variable that contained credentials to a database. My current solution is 80% of the way there. I set the credentials in a variable in an encrypted script, then I Include() that script and use the variable in a script that connects to the database. Anyone who opens the main script can see the credentials by going to the log file and looking up the variable. The JSL developers were in demand at the Summit and other people I talked to weren't sure how to hide a variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I saw this:&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/17.2/index.shtml#page/jmp/encryption-and-global-variables.shtml#" target="_blank"&gt;Encryption and Global Variables (jmp.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you just put two underscores before a variable it will hide them ... almost. If you try Show ( __myVar), Print&amp;nbsp;( __myVar), or Write ( __myVar), the result will be blank. Great! But then I found if you just type __myVar directly into the log, the log defines it for you. That's actually one of the easiest ways to show the variable...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems like an un-intended loophole. The double underscore stops all those script methods and if you hover over the variable name in the script it won't show the contents. But there's this real obvious way to show the contents just by entering the variable directly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have good reasons for not wanting to encrypt the main script, only the connection string. Not sure if this is a Wishlist item or if I am missing something.&lt;/P&gt;</description>
    <pubDate>Tue, 31 Oct 2023 18:01:30 GMT</pubDate>
    <dc:creator>jay_holavarri</dc:creator>
    <dc:date>2023-10-31T18:01:30Z</dc:date>
    <item>
      <title>Hiding a Variable from the Log with Underscores ... Almost Works</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692676#M87823</link>
      <description>&lt;P&gt;At the recent JMP Summit I was asking developers about how I could hide a variable that contained credentials to a database. My current solution is 80% of the way there. I set the credentials in a variable in an encrypted script, then I Include() that script and use the variable in a script that connects to the database. Anyone who opens the main script can see the credentials by going to the log file and looking up the variable. The JSL developers were in demand at the Summit and other people I talked to weren't sure how to hide a variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I saw this:&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/17.2/index.shtml#page/jmp/encryption-and-global-variables.shtml#" target="_blank"&gt;Encryption and Global Variables (jmp.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you just put two underscores before a variable it will hide them ... almost. If you try Show ( __myVar), Print&amp;nbsp;( __myVar), or Write ( __myVar), the result will be blank. Great! But then I found if you just type __myVar directly into the log, the log defines it for you. That's actually one of the easiest ways to show the variable...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems like an un-intended loophole. The double underscore stops all those script methods and if you hover over the variable name in the script it won't show the contents. But there's this real obvious way to show the contents just by entering the variable directly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have good reasons for not wanting to encrypt the main script, only the connection string. Not sure if this is a Wishlist item or if I am missing something.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 18:01:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692676#M87823</guid>
      <dc:creator>jay_holavarri</dc:creator>
      <dc:date>2023-10-31T18:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a Variable from the Log with Underscores ... Almost Works</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692704#M87824</link>
      <description>&lt;P&gt;I think you have to either:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;create encrypted function to perform the query which contains the connection string inside the function (never return those)&lt;/LI&gt;
&lt;LI&gt;create encrypted function which &lt;STRONG&gt;opens&lt;/STRONG&gt; the database connection (cannot use New SQL Query() if you use this &lt;A href="https://community.jmp.com/t5/Discussions/Which-way-to-go-query-database/m-p/655367/highlight/true#M84451" target="_blank" rel="noopener"&gt;which is the preferred method in JMP to perform data queries&lt;/A&gt;)&lt;/LI&gt;
&lt;LI&gt;Use something like Windows credential manager&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;LI-MESSAGE title="JMP scripts embed DSN parameters; why??" uid="7933" url="https://community.jmp.com/t5/Discussions/JMP-scripts-embed-DSN-parameters-why/m-p/7933#U7933" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="How to handle user password information in JSL ( ODBC connection strings )" uid="627942" url="https://community.jmp.com/t5/Discussions/How-to-handle-user-password-information-in-JSL-ODBC-connection/m-p/627942#U627942" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="JMP and Oracle: Tips and Tricks for a Happy Marriage (2022-US-30MP-1093)" uid="505583" url="https://community.jmp.com/t5/Discovery-Summit-Americas-2022/JMP-and-Oracle-Tips-and-Tricks-for-a-Happy-Marriage-2022-US-30MP/m-p/505583#U505583" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 06:22:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692704#M87824</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-11-01T06:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a Variable from the Log with Underscores ... Almost Works</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692709#M87825</link>
      <description>&lt;P&gt;If you look at my "JMP and Oracle ..." talk mentioned above this is what I do:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create an encrypted function that returns the database connection.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Here's the tail end of the function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	my_dbc = create database connection(dsn_string);
// Return the connection to Oracle
	my_dbc;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Oct 2023 19:12:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692709#M87825</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2023-10-31T19:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a Variable from the Log with Underscores ... Almost Works</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692758#M87830</link>
      <description>&lt;P&gt;Apparently, you can also see all the "hidden" variables in the debugger.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mmarchandTSI_0-1698788032762.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58154iE42CC4145842A951/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mmarchandTSI_0-1698788032762.png" alt="mmarchandTSI_0-1698788032762.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 21:34:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692758#M87830</guid>
      <dc:creator>mmarchandTSI</dc:creator>
      <dc:date>2023-10-31T21:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a Variable from the Log with Underscores ... Almost Works</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692785#M87832</link>
      <description>&lt;P&gt;Thank you! I think this gets me 99% of the way there. It solves the variable problem nicely. The 1% is that I can see the credentials when the Include() command is run. Anyone looking at the script can see something like Include(db_credentials), run that line, and look in the log file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For me it looks like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Include("DSN encrypted function.jsl");


//Log file shows:
//:*/
Include("DSN encrypted function.jsl");
/*:
Function( {},
	{Default Local},
	dsn_string = "DSN=myDSN;UID=" || "uname" || ";PWD=" || "pwd" || ";";
	my_dbc = Create Database Connection( dsn_string );
	my_dbc;
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It also doesn't address the part of my question about the two underscore technique. Why have it if it only partially obscures variables? Is it for security or some other purpose?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 23:09:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692785#M87832</guid>
      <dc:creator>jay_holavarri</dc:creator>
      <dc:date>2023-10-31T23:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a Variable from the Log with Underscores ... Almost Works</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692786#M87833</link>
      <description>&lt;P&gt;Actually, it gets me 100% of the way there. It occured to me that the Include would only show the last thing it did in the log. I added a Print("This is the last thing") and now I can't see the function definition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 23:11:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692786#M87833</guid>
      <dc:creator>jay_holavarri</dc:creator>
      <dc:date>2023-10-31T23:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a Variable from the Log with Underscores ... Almost Works</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692936#M87845</link>
      <description>&lt;P&gt;I've been redefining sensitive variables as Empty() after I use them so, even if someone gets the variable names, they won't contain any information.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 13:09:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/692936#M87845</guid>
      <dc:creator>mmarchandTSI</dc:creator>
      <dc:date>2023-11-01T13:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a Variable from the Log with Underscores ... Almost Works</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/800875#M97634</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;great idea!&lt;BR /&gt;I found this recommendation in&amp;nbsp;&lt;BR /&gt;&lt;A href="https://www.jmp.com/support/help/en/19.0/?os=win&amp;amp;source=application#page/jmp/work-with-expressions-in-an-encrypted-script.shtml#" target="_blank"&gt;https://www.jmp.com/support/help/en/19.0/?os=win&amp;amp;source=application#page/jmp/work-with-expressions-in-an-encrypted-script.shtml#&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_2-1763829209774.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/87532iDC1F37C03E93781D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_2-1763829209774.png" alt="hogi_2-1763829209774.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;On the other hand,&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/19.0/?os=win&amp;amp;source=application#page/jmp/encryption-and-global-variables.shtml" target="_blank"&gt;https://www.jmp.com/support/help/en/19.0/?os=win&amp;amp;source=application#page/jmp/encryption-and-global-variables.shtml&lt;/A&gt;&amp;nbsp;is more a warning and less a strategy:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_1-1763829135582.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/87531iDDA2ACB34BC016E4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_1-1763829135582.png" alt="hogi_1-1763829135582.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;BR /&gt;&lt;BR /&gt;Names default to here(1);
__Hello=1;
Show(__Hello);
Show(Char(__Hello));



new namespace("__Test");
__Test:Hello=1;
Show(__Test);
Show namespaces();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;same with encryption:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//-e12.1
0,
344,4353eJwNzdmRhSAQAMB8NoWRc0AERu5DzT+Qff9d1QFHqsV6JkdVotYlkkDhRd03clZQQT4lY/V9by5qQPZ9+cMUryFddMeUzS/o
xBrLU9Be+4jFDalbz/jcKoH6mKax/aHIcsukQunhCmoHGbPI3PlbvwfT9ime6fmsTLNx7dCG3WexZhOfUzvj9U3itCUnjnbdv3yj
AaaaOb9Y+hhpa97cISVRJJVBVNCklH+vNc37BuxS3iv9QMQa4/lOEyo3hZ56pN5qBk8XfRSHcw3c5vwEgG20xmhAQ+w2zYhIk6+k
SDhYpzxVziJBoDwOpTSXHKXq2e3o1hnd+PsHyKdkiw==
,0,


Show(__Hello);
Show(Char(__Hello));
Show Namespaces()
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;... still with access to all the definitions.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Nov 2025 16:37:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-a-Variable-from-the-Log-with-Underscores-Almost-Works/m-p/800875#M97634</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-11-22T16:37:24Z</dc:date>
    </item>
  </channel>
</rss>

