cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP 19 is here! See the new features at jmp.com/new.
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.

Introduction to the JMP Scripting Language

Choose Language Hide Translation Bar

Featured Items

Latest Posts

  • Introduction to the JMP Scripting Language

    This course covers the basics of scripting with JSL and then progresses to more advanced topics, including working with data tables, using matrices to facilitate computations, scripting analyses, and capturing results to make custom reports. The course also presents suggested best practices throughout.

    ruthhummel ruthhummel
    52491 views | 0 replies
  • What Are Scripts?

    So, what are scripts? JMP is designed to be very interactive but that's not the only way to work with it. You can also use a script to communicate with JMP in order to complete an analysis or task. A script uses the JMP Scripting Language, or JSL, to convey what you want to use in JMP and how you want to use it, in words rather than through mouse-clicks. Although using scripts is differ...

    ruthhummel ruthhummel
    819 views | 0 replies
  • Creating a Script to Perform a Common Action

    So in this demonstration, I'm going to illustrate the agreement between the interactive actions and the elements in the corresponding script. And I'll do that by creating a scatterplot with two continuous variables and then fit a trend line to the data. And I'm going to note the steps that are involved in the process. So I have JMP open. And I've opened the course journal, which is call...

    ruthhummel ruthhummel
    751 views | 0 replies
  • Making New Columns and Perform Analysis

    This demonstration is going to introduce two examples of how scripts can be used. In one, we'll make new columns and perform analyses with them. And in the other, we'll use a dialog box to generate a custom report. In the course journal in Section I'm going to click Reaction-Injection Molding Temperature Data. I'll go ahead and make the timestamp column wider so we can read the whole va...

    ruthhummel ruthhummel
    484 views | 0 replies
  • Creating a Dialog Box to Generate a Custom Report

    Now, my second example is going to demonstrate a script that makes a dialog box for selective processing to make a custom report. So the user will be able to select a range of dates and process parameters and make a new data table with the custom table variables and scripts, based on user input. So I'll return to the course journal and click Process Data. And again, we have some kind of...

    ruthhummel ruthhummel
    724 views | 0 replies
  • What Is Object-Oriented Scripting?

    A computer program can be a set of step-by-step instructions, which is known as procedural programming. But a different way of scripting is called object-oriented programming. And this kind of programming is a conceptual framework for software design that views software development in terms of interacting objects instead of just sequential procedures. And it also proposes that software ...

    ruthhummel ruthhummel
    807 views | 0 replies
  • Saving Scripts and Working with Automatic Scripts

    Scripts are typically meant to be run repeatedly over time, and possibly in different situations. In order to maximize the flexibility of scripts, JMP provides several ways for you to save them. You can save a script in a standalone JSL source code file and then open it and run it from the Script Editor or the Debugger. You can save a script to the data table or as a data column formula...

    ruthhummel ruthhummel
    971 views | 0 replies
  • Automatic Script Generation

    A great feature of JMP is that it can generate a script for you from an existing object, like a data table or an analysis platform. This can be really helpful. One thing it lets you do is exactly repeat an analysis after some change to the data, either now or in the future. Or, if you perform a series of analyses and have JMP save those scripts to the data table, you can share the data ...

    ruthhummel ruthhummel
    524 views | 0 replies
  • Creating Scripts Automatically and Saving Scripts

    So this demonstration, we'll look at the various ways that you can create and save JMP scripts. So I'll begin by interactively creating a new column with a formula where I calculate the standardized value of the tensile strength of concrete. So in the journal in section I'll click Concrete Strength Data. So to create my new column of the standardized strength, I'll go to the Columns men...

    ruthhummel ruthhummel
    2228 views | 0 replies
  • Overview Basics

    In order to write your own scripts, you need to familiarize yourself with the elements that a script can contain: names, variables, functions and operators, numbers, character strings, punctuation, and comments. Let's take a look at each of these in turn.

    ruthhummel ruthhummel
    338 views | 0 replies
  • Names

    Names are important in JMP, and especially in scripting. In fact, everything in JMP has a name! This includes objects, menu commands, functions, and messages to objects. And the variables in your scripts also have names. Names have to follow certain rules or syntax. A name has to start with either an alphabetic character--A through Z, lowercase or uppercase--or an underscore. So, names ...

    ruthhummel ruthhummel
    862 views | 0 replies
  • Variables

    OK, so now let's talk about variables. You can use variables to store values that aren't constant from one time a script runs to another. These values can be data of any type, data structures of any kind, or references to another object. Unlike in many programming languages, JMP variables don't need to be declared, or listed at the start of the script, and they're not limited to storing...

    ruthhummel ruthhummel
    1002 views | 0 replies
  • Creating Variables

    OK, so let's look at a few examples of creating variables. Suppose you want to create a variable named a, and you want to assign the value of to it. This assignment statement (a = creates a global variable with the value of What if you want a local variable named a? To create a local variable, you use the Local function, which takes two arguments: the first argument is a name or list of...

    ruthhummel ruthhummel
    2316 views | 0 replies
  • Functions

    Functions are a vital element of the scripting language, so let's discuss them. You call a function when you need it, and every function returns a result. To call a function, you type the function name followed by two matching parentheses -- the matching parentheses are what tells JMP that a name is a function. For example, Names Default to Here followed by matching parentheses that con...

    ruthhummel ruthhummel
    1191 views | 0 replies
  • Combining Functions

    So, it might surprise you to learn that every script is actually a single function along with its arguments. And it might seem at first like this requirement would limit how much a script can do. But remember that a function can have arguments and that some of those arguments can be functions as well. For example, you might want to add the square root of to the sine of The Add function ...

    ruthhummel ruthhummel
    734 views | 0 replies
  • Numbers

    Numbers are an essential form of data, and can be expressed as integers, decimals, or in scientific notation. Dates and times are also represented by a number. A missing numeric value is represented by a period. Let's go into a little more detail about dates, times, and durations. These are all numeric values that represent a number of seconds. Specifically, dates are defined as the num...

    ruthhummel ruthhummel
    427 views | 0 replies
  • Character Strings

    Some data are text that are represented by character strings. Character strings are delimited by double-quotation marks, and these delimiters are not part of the text. So, what if you need to include double quotation marks as part of your string value? To do that, each of the embedded quotation marks has to be preceded with the escape sequence of a backward slash and an exclamation poin...

    ruthhummel ruthhummel
    1193 views | 0 replies
  • Punctuation

    Now let's talk about punctuation in your scripts. Commas separate items-- they separate items in lists, rows in matrices, and arguments in a function or message. Parentheses serve several purposes. They're used to identify a name as a function. They surround the arguments of a function. And, they can control the order of evaluation in expressions.

    ruthhummel ruthhummel
    356 views | 0 replies
  • Comments

    Next, let's talk about comments. It can be really helpful to include comments in your scripts. Comments aren't executed when the script runs, so they could be notes to yourself (for example, documenting the script for future updates or maintenance), or they could be notes to others who might use your script (providing instructions, for example). You might also comment out a portion of y...

    ruthhummel ruthhummel
    626 views | 0 replies
  • Working with Local Variables

    Well now, let's take a quick look at local variables and using the local function. So I'm going to clear the contents of the Script Editor and I'm going to type local and open parentheses. And recall that the first argument is a list of the local variable names and I can either make the assignments in that list or that could be part of the JSL expression that is the second argument to t...

    ruthhummel ruthhummel
    757 views | 0 replies
  • Using Date and Time Functions

    So next, let's talk a little bit about date and time functions. I'm going to clear the contents of the Script Editor window. I'd like to clear the log as well. And I do that by right clicking in the Log window and selecting Clear Log. So remember that dates and times are stored as the number of seconds since midnight January And you can store those in a variable. And we can also use dat...

    ruthhummel ruthhummel
    1243 views | 0 replies
  • Using the Log

    So we've been making use of the log to look at the results of all of the lines of code that we've run. But we can also control what shows up in the log. So let me clear that and clear the Script Editor window. So one thing I could do, if I am working with global variables, which, of course, I have been, is I can type show globals open close parentheses. I don't have to have an argument,...

    ruthhummel ruthhummel
    1284 views | 0 replies
  • Objects and Messages

    Now let's discuss the concept of objects. Many of the capabilities of JMP are available to your script through built-in objects. Every JMP object knows how to perform certain actions or tasks. And some examples of JMP objects are data tables, data columns, platforms, and even JMP itself. Now in order to use an object in your script, the script first needs to instantiate the object, or c...

    ruthhummel ruthhummel
    550 views | 0 replies
  • Introduction to Lists

    An important data structure in JMP is a list, which is a general-purpose storage container that can store any number of items. The items can be any type of data such as numbers, character strings, object references, or other lists, and the items in the list don't need to be the same type. You can create a list with the List function, or with the curly brackets operator. Items in a list ...

    ruthhummel ruthhummel
    2107 views | 0 replies
  • Working with Lists

    Lists are dynamic. You can easily add items to or remove items from a list as necessary. You use the Insert function or the Insert Into function to add items to a list. By default, the items are added at the end of the list. Optionally, you can include an argument to specify the position of the item you're adding. The Insert function returns a new list with the added item but doesn't ch...

    ruthhummel ruthhummel
    1665 views | 0 replies