<?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: saving global variable between JMP sessions in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/saving-global-variable-between-JMP-sessions/m-p/237082#M46807</link>
    <description>&lt;P&gt;If the values are changed and need to be re-saved, consider using an add-in. Add-ins can have a script that runs when JMP starts and a script that runs when JMP stops. The add-in does not need to have an item in the menu to do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also consider keeping the values in a data table with a column for each value. You probably only need a single row, but a 2nd row could be an alternate set of values. The data table will also provide a save prompt, so the add-in might not be needed.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2019 15:14:33 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2019-12-03T15:14:33Z</dc:date>
    <item>
      <title>saving global variable between JMP sessions</title>
      <link>https://community.jmp.com/t5/Discussions/saving-global-variable-between-JMP-sessions/m-p/237059#M46802</link>
      <description>&lt;P&gt;How I can define a variable that is recorded in JMP, so next time I open it I still have access to it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, global variables are defined as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;::my_global_variable = 42;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 10:14:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/saving-global-variable-between-JMP-sessions/m-p/237059#M46802</guid>
      <dc:creator>FN</dc:creator>
      <dc:date>2019-12-03T10:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: saving global variable between JMP sessions</title>
      <link>https://community.jmp.com/t5/Discussions/saving-global-variable-between-JMP-sessions/m-p/237079#M46804</link>
      <description>&lt;P&gt;Try this code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

save assignment = Char( ::my_global_variable = 42; );

Save Text File( "Saved Assignment.jsl", save assignment );

// either immediately execute

Include( "Saved Assignment.jsl" );

// or save character string before executing or furthe processing

save assignment = Load Text File( "Saved Assignment.jsl" );
Parse( save assignment );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(I did not test it.)&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 11:42:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/saving-global-variable-between-JMP-sessions/m-p/237079#M46804</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-12-03T11:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: saving global variable between JMP sessions</title>
      <link>https://community.jmp.com/t5/Discussions/saving-global-variable-between-JMP-sessions/m-p/237080#M46805</link>
      <description>&lt;P&gt;I will add to&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt; response. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;JMP allows for a script to be run at startup. Check in the Scripting Guide for the version of JMP you are using for the name and location where you need to place the file. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the documentation for JMP 15&lt;/P&gt;
&lt;P&gt;&lt;FONT style="background-color: #ffffff;"&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Run a Script at Start Up&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;You can run the same script every time you start JMP. For example, you might include the&lt;BR /&gt;definitions of some utility functions or a namespace that you want available throughout your&lt;BR /&gt;JMP session. You might also set some preferences in a startup script to keep preferences&lt;BR /&gt;consistent. Preferences persist across JMP sessions, but you could explicitly reset some&lt;BR /&gt;preferences in case they were changed at some point in the previous session.&lt;BR /&gt;Name the script jmpStart.jsl and place it in one of the following folders, as appropriate for&lt;BR /&gt;your operating system. When JMP starts, JMP looks for the jmpStart.jsl script in these folders&lt;BR /&gt;in the order in which they are listed here. The first one that is found is run, and the search&lt;BR /&gt;immediately stops.&lt;BR /&gt;Note: Some path names in this section refer to the “JMP” folder. On Windows, in JMP Pro, the&lt;BR /&gt;“JMP” folder is named “JMPPro”.&lt;BR /&gt;On Windows:&lt;BR /&gt;1. C:/Users/&amp;lt;username&amp;gt;/AppData/Roaming/SAS/JMP/15&lt;BR /&gt;2. C:/Users/&amp;lt;username&amp;gt;/AppData/Roaming/SAS/JMP&lt;BR /&gt;On macOS:&lt;BR /&gt;1. /Users/&amp;lt;username&amp;gt;/Library/Application Support/JMP/15&lt;BR /&gt;2. /Users/&amp;lt;username&amp;gt;/Library/Application Support/JMP&lt;BR /&gt;The jmpStart.jsl script runs only for a particular user on a computer. You can add a script&lt;BR /&gt;named jmpStartAdmin.jsl in one of the following places, as appropriate for your operating&lt;BR /&gt;system. This script is run for every user on a computer. JMP runs jmpStartAdmin.jsl first if&lt;BR /&gt;found. Then JMP runs jmpStart.jsl if found.&lt;BR /&gt;On Windows:&lt;BR /&gt;1. C:/ProgramData/SAS/JMP/15&lt;BR /&gt;2. C:/ProgramData/SAS/JMP&lt;BR /&gt;On macOS:&lt;BR /&gt;1. /Library/Application Support/JMP/15&lt;BR /&gt;2. /Library/Application Support/JMP&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT style="background-color: #ffffff;"&gt;Note: For JMPPro&amp;nbsp; the directory path references to JMP change to JMPPro,&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that file you could place a simple line:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Try( Include( "Saved Assignment.jsl" ) );&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;Everytime JMP would startup, it would look for the file, and run it if the file existed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 13:13:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/saving-global-variable-between-JMP-sessions/m-p/237080#M46805</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-12-03T13:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: saving global variable between JMP sessions</title>
      <link>https://community.jmp.com/t5/Discussions/saving-global-variable-between-JMP-sessions/m-p/237082#M46807</link>
      <description>&lt;P&gt;If the values are changed and need to be re-saved, consider using an add-in. Add-ins can have a script that runs when JMP starts and a script that runs when JMP stops. The add-in does not need to have an item in the menu to do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also consider keeping the values in a data table with a column for each value. You probably only need a single row, but a 2nd row could be an alternate set of values. The data table will also provide a save prompt, so the add-in might not be needed.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 15:14:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/saving-global-variable-between-JMP-sessions/m-p/237082#M46807</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2019-12-03T15:14:33Z</dc:date>
    </item>
  </channel>
</rss>

