Scripting Guide > Types of Data > Path Variables
Publication date: 04/12/2021

Path Variables

Path variables are shortcuts to directories or files. Rather than enter the entire path to the directory or file, you use the path variable in a script. A path variable is a special type of string and is always contained within double quotation marks.

One common predefined path variable in JMP is $SAMPLE_DATA. This variable points to the sample data folder in your JMP or JMP Pro installation folder. The following example opens the Big sample data table.

Open( "$SAMPLE_DATA/Big" );

Several path variables are predefined in JMP. The following table shows the definitions for the current JMP version. Variables in previous versions of JMP might differ.

Table 6.1 Predefined Path Variable Definitions




Defines the folder where the specified add-in is stored.

Add-In Builder stores the specified add-in in the following folders, based on your operating system:

Windows: "C:/Users/<username>/AppData/Roaming/SAS/JMP/Addins/"

macOS: "/Users/<username>/Library/Application Support/JMP/Addins/"

For example, Convert File Path( "$ADDIN_HOME( evaluates to the location of the add-in.

To install your add-ins in a shared network location, use the Register Addin() function. See Register an Add-In Using JSL.


Defines a folder that can be accessed by all users on a machine.

Windows (JMP): "/C:/ProgramData/SAS/JMP/16/"

Windows (JMP Pro): "/C:/ProgramData/SAS/JMPPro/16/"

macOS: "/Library/Application Support/JMP/16/"

To see if the directory exists, run the script Is Directory("$ALL_HOME");. If the folder exists, 1 is returned.


Windows (JMP): "/C:/Program Files/SAS/JMP/16/Resources/Builtins/"

Windows (JMP Pro): "/C:/Program Files/SAS/JMPPRO/16/Resources/Builtins/"

macOS: "/Applications/JMP"


Windows: "/C:/Users/<username>/Desktop/"

macOS "/Users/<username>/Desktop/"


Windows: "/C:/Users/<username>/Documents/"

macOS: "/Users/<username>/Documents/"


Windows: "/C:/Users/<username>/Downloads/"

macOS: "/Users/<username>/Downloads/"


"/<JMP Genomics installation directory>/"


Windows (JMP): "/C:/Users/<username>/AppData/Roaming/SAS/JMP/16/"

Windows (JMP Pro): "/C:/Users/<username>/AppData/Roaming/SAS/JMPPro/16/"

macOS: "/Users/<username>/"


Windows: /C:/<JMP installation directory>

macOS: "/Library/Application Support/JMP/16/

Note: The macOS path exists only if add-ins are installed.


Windows: /C:/<JMP installation directory>/Samples/Apps/"

macOS: "/Library/Application Support/JMP/16/Samples/Apps/"


Windows: /C:/<JMP installation directory>/Samples/Dashboards/"

macOS: "/Library/Application Support/JMP/16/Samples/Dashboards/"


Windows: "/C:/<JMP installation directory>/Samples/Data/"

macOS: "/Library/Application Support/JMP/16/Samples/Data/"


Windows: "/C:/<JMP installation directory>/Samples/Images/"

macOS "/Library/Application Support/JMP/16/Samples/Images/"


Windows: "/C:/<JMP installation directory>/Samples/Import Data/"

macOS: "/Library/Application Support/JMP/16/Samples/Import Data/"


Windows: "/C:/<JMP installation directory>/Samples/Projects/"

macOS: "/Library/Application Support/JMP/16/Samples/Projects/"


Windows: "/C:/<JMP installation directory>/Samples/Scripts/"

macOS: "/Library/Application Support/JMP/16/Samples/Scripts/"


Windows: "/C:/Users/<username>/AppData/Local/Temp/"

macOS: "var/folders/..."


Changes to JMP preferences, menus, and the Home Window are stored here, along with Debugger session settings.

Windows (JMP): "/C:/Users/<username>/AppData/Roaming/SAS/JMP/16/"

Windows (JMP Pro): "/C:/Users/<username>/AppData/Roaming/SAS/JMPPro/16/"

macOS: "/Users/<username>/Library/Application Support/JMP/16/"

Path variable definitions are updated automatically based on the version of JMP you are using. For example, when you run a JMP 14 script in JMP 16, the JMP 16 path variable definitions are used.

To see the definition of any path variable, use the function Get Path Variable:

Get Path Variable( "HOME" );


Note that you don’t include a dollar sign for Set Path Variable() or Get Path Variable(). But you must include the dollar sign when using the variable in a script.

Trailing Slashes

Make sure to include a trailing slash after the path variable. In the following example, the root name "Big Class" is assigned to the dtName variable. The Open() expression evaluates $SAMPLE_DATA and the trailing slash and then appends the dtName value along with the file extension .jmp.

dtName = "Big Class";
dt = Open( "$SAMPLE_DATA/" || dtName || ".jmp" );

The path is interpreted as:

C:/Program Files/SAS/JMP/16/Samples/Data/Big

Without the slash that follows $SAMPLE_DATA, the path is interpreted as:

C:/Program Files/SAS/JMP/16/Samples/DataBig
Want more information? Have questions? Get answers in the JMP User Community (