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 Class.jmp sample data table.
Open( "$SAMPLE_DATA/Big Class.jmp" );
Windows: "C:/Users/<username>/AppData/Roaming/SAS/JMP/Addins/"
Macintosh: "/Users/<username>/Library/Application Support/JMP/Addins/"
Windows (JMP): "/C:/ProgramData/SAS/JMP/<version number>/"
Windows (JMP Pro): "/C:/ProgramData/SAS/JMPPro/<version number>/"
Windows (JMP Shrinkwrap): "/C:/ProgramData/SAS/JMPSW/<version number>/"
Macintosh: "/Library/Application Support/JMP/<version number>/"
To see if the directory exists, run the script Is Directory("$ALL_HOME");. If the folder exists, 1 is returned.
Windows: "/C:/Users/<username>/Desktop/"
Macintosh "/Users/<username>/Desktop/"
Windows: "/C:/Users/<username>/Documents/"
Macintosh: "/Users/<username>/Documents/"
Windows: "/C:/Users/<username>/Downloads/"
Macintosh: "/Users/<username>/Downloads/"
Windows (JMP): "/C:/Users/<username>/AppData/Roaming/SAS/JMP/<version number>/"
Windows (JMP Pro): "/C:/Users/<username>/AppData/Roaming/SAS/JMPPro/<version number>/"
Windows (JMP Shrinkwrap): "/C:/Users/<username>/AppData/Roaming/SAS/JMPSW/<version number>/"
Macintosh: "/Users/<username>/"
Windows: /C:/<JMP installation directory>
Macintosh: "/Library/Application Support/<JMP installation directory>/JMP.app/Contents/Resources/AddIns/
Windows: /C:/<JMP installation directory>/Samples/Apps/"
Macintosh: "/Library/Application Support/<JMP installation directory>/Samples/Apps/"
Windows: /C:/<JMP installation directory>/Samples/Dashboards/"
Macintosh: "/Library/Application Support/<JMP installation directory>/Samples/Dashboards/"
Windows: "/C:/<JMP installation directory>/Samples/Data/"
Macintosh: "/Library/Application Support/<JMP installation directory>/Samples/Data/"
Windows: "/C:/<JMP installation directory>/Samples/Images/"
Macintosh: "/Library/Application Support/<JMP installation directory>/Samples/Images/"
Windows: "/C:/<JMP installation directory>/Samples/Import Data/"
Macintosh: "/Library/Application Support/<JMP installation directory>/Samples/Import Data/"
Windows: "/C:/<JMP installation directory>/Samples/Projects/"
Macintosh: "/Library/Application Support/<JMP installation directory>/Samples/Projects/"
Windows: "/C:/<JMP installation directory>/Samples/Scripts/"
Macintosh: "/Library/Application Support/<JMP installation directory>/Samples/Scripts/"
Windows: "/C:/Users/<username>/AppData/Roaming/Temp/"
Macintosh: "/private/var/folders/.../Temporary Items/"
Windows (JMP): "/C:/Users/<username>/AppData/Roaming/SAS/JMP/<version number>/"
Windows (JMP Pro): "/C:/Users/<username>/AppData/Roaming/SAS/JMPPro/<version number>/"
Windows (JMP Shrinkwrap): "/C:/Users/<username>/AppData/Roaming/SAS/JMPSW/<version number>/"
Macintosh: "/Users/<username>/Library/Application Support/JMP/<version number>/"
Get Path Variable( "HOME" );
"/C:/Users/<username>/AppData/Roaming/SAS/JMP/14/"
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.
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" );
C:/Program Files/SAS/JMP/14/Samples/Data/Big Class.jmp
Without the slash that follows $SAMPLE_DATA, the path is interpreted as:
C:/Program Files/SAS/JMP/14/Samples/DataBig Class.jmp

Help created on 7/12/2018