Alpha Shape
For the following messages, ashape stands for an alpha shape or a reference to one.
ashape <<Get Alpha
Returns the current alpha value.
ashape <<Set Alpha(alpha)
Sets the current alpha value and recomputes the triangulation.
ashape <<Get Tri Alpha
Returns the alpha values for each triangle.
Associative Arrays
For the following messages, map stands for an associative array or a reference to one.
map<<First
Returns the first key within map, or Empty() if map has no keys. Note that keys are returned in lexicographical order.
map<<Get Contents
Returns a list of all key-value pairs within map.
map<<Get Keys
Returns a list of all the keys within map.
map<<Get Default Value()
Returns the implicit value of all absent keys, or Empty() if none has been set.
map<<Get Value(key)
Returns the value for the key within map.
map<<Get Values(<keylist>)
If no argument is provided, a list of all values within map is returned.
If a list of keys is provided, a list of the values corresponding to only those keys is returned.
map<<Insert(key, value)
Inserts the key into map and assigns value to it. If key already exists in map, its value is replaced by the new value given. This message is equivalent to the function Insert Into.
map<<Next(key)
Returns the key following the given key within the map, or Empty() if map has no keys. Note that keys are returned in lexicographical order.
map<<Remove(key)
Removes the key and value from map. This message is equivalent to the function Remove From.
map<<Set Default Value(v)
Sets the implicit value of all absent keys. Any key added without a value is assigned this value by default.
Data Tables
dt<<Add Column Properties(property argument, ...)
Add the specified properties to the selected column.
dt<<Add Multiple Columns("prefix", n, position, attributes)
Adds n columns to dt at the position indicated.
dt<<Add Rows(count, <rownum>)
dt<<Add Rows(assignment list)
Add the number of rows specified to the bottom of the data table or starting at the rownum specified.
dt<<Add Scripts to Table(script, ...)
dt<<Add Properties to Table(script, ...)
Adds the specified scripts to the data table.
dt<<Anonymize(<columns(list)>, <Output Table Name(string)>);
Removes unique identifiers from data, some column properties, and table scripts. Applies to a data table or selected columns.
dt<<Begin Data Update
Holds off display updating to allow for quick updating of data table cells. Use End Data Update in conjunction with this command to turn display updating back on.
Notes
Begin Data Update does not affect the data refresh due to some other table manipulations. For example, when you delete or add columns, the data table is updated and then the data update begins.
dt<<Clear Column Selection
Deselects all selected columns. When columns are deleted, the display is refreshed.
dt<<Clear Row States
Cancels any row states in effect.
dt<<Clear Select
Turns off the current selection.
dt<<Clone Formula Column(column, n, Substitute Column Reference(column1, {list}))
Creates n new formula columns, substituting references to column1 with columns from the list into the formula from the original column.
dt<<Close Data Grid(Boolean)
Closes the data table grid.
dt<<Close Side Panels(Boolean)
Closes the side panel in a data table.
dt<<Color or Mark by Column(col, <optional arguments>)
dt<<Color by Column(col, <optional arguments>)
Function
Assigns colors or markers according to the values of a data table column. If no optional arguments are provided, row states are used.
Arguments
Color Number(n)
Uses the specified quoted JMP color.
Color Theme("theme")
Uses the specified quoted color theme.
Marker Theme("named argument")
Uses the specified quoted marker theme: "standard", "hollow", "paired", "classic", or "alphanumeric".
Continuous Scale
For Color by Column, assigns colors in a chromatic sequential fashion based on the values in the highlighted column.
Reverse Scale
Reverses the color scheme in use.
Excluded Rows
Applies the row states to excluded columns.
Make Window with Legend
Creates a separate window with a legend.
dt<<Color Rows by Row State
Colors the rows in the data table grid using the color assignments by row states. Send the message again to turn off the row colors.
dt<<Compress Selected Columns({column1, ...})
Compresses the listed columns into the most compact form that is possible. Columns with character data are compressed to 1 byte if there are fewer than 255 levels. Columns with numeric data are compressed to 1 byte if the numeric values are between -127 and 127.
dt<<Concatenate(dt2, ..., Keep Formulas, Output Table Name("name"))
Creates a new table ("name") from the rows of dt and dt2.
dt<<Copy Table Script
Copies the script to recreate the data table onto the clipboard so that it can be pasted somewhere else.
dt<<Data Filter(<Mode(...)>, <Add Filter (...)>)
Constructs a data filter. If no arguments are specified, the Add Filter Columns window appears.
Arguments for Mode() include Select(), Show(), and Include(). They are all Boolean. Select defaults to true(1), and Show and Include default to false (0).
Arguments for Add Filter() include Columns(), and Where(). Columns() takes one or more column names separated by commas. You can add one or more WHERE clauses to define the filter.
There are several additional arguments. For more information, see the JMP Reports chapter in the Using JMP book and the Data Tables chapter in the Scripting Guide.
dt<<Get Header Height
Returns the column header’s display height (in pixels).
dt<<Data View(<"options">)
Duplicates the data table in a new window. If you specify one of the following quoted arguments, the new data table includes only the corresponding rows.
excluded
Quoted. The new data table includes only the rows that are marked as excluded in the original data table.
labeled | labelled
Quoted. The new data table includes only the rows that are marked as labeled in the original data table.
hidden
Quoted. The new data table includes only the rows that are marked as hidden in the original data table.
selected
Quoted. The new data table includes only the rows that are selected in the original data table.
dt<<Delete Columns(col, col2, ...)
dt<<Delete Column
Deletes column(s) from the data table dt. Specify which column or columns to delete. Without an argument, deletes the selected columns, if any. Delete Column is a synonym.
dt<<Delete Rows(<n>)
dt<<Delete Rows({n, o, p, ...})
dt<<Delete Rows({n::q})
Deletes the currently selected rows or rows specified.
dt<<Delete Table Property("name")
Deletes a table property (for example, a script).
dt<<Delete Table Variable("name")
Deletes a table variable.
dt<<End Data Update
Resumes display updating after a Begin Data Update message. These commands are used for quick updates of the data table when many changes have to be made. Speed is gained by turning off display updating.
dt<<Exclude
dt<<Unexclude
Toggles selected rows in dt from excluded to unexcluded or vice versa.
dt<<Get All Columns As Matrix
Returns the values from all columns of dt in a matrix. Character columns are numbered according to the levels, starting at 1.
dt<<Get As Matrix
Returns values from the numeric columns of dt in a matrix.
dt<<Get As Report
Returns the data table as a report.
Example
The following script returns Big Class.jmp as a report and displays it and a distribution in one window.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dtRpt = dt << Get As Report;
distRpt = V List Box(
dt << Distribution(
Continuous Distribution( Column( :weight ) ),
Nominal Distribution( Column( :age ) )
)
);
New Window( "Example", H List Box( dtRpt, distRpt ) );
dt<<Get Column Names("arguments")
Returns a list of column names in a data table. The "arguments" restrict the names retrieved as follows:
"Numeric", "Ordinal", "Rowstate", "Continuous", "Ordinal", and "Nominal" get only the specified types of columns. More than one can be specified. "String" returns a list of strings rather than a list of column references.
dt<<Get Column Reference(list or matrix of col names)
Returns the column reference of the strings in the list or matrix. If no list or matrix is used, JMP returns all column names.
dt<<Get Display Width
Returns the column display width in pixels.
dt<<Get Excluded Rows
Returns the currently excluded rows in the data table.
dt<<Get Hidden Rows
Returns the currently hidden rows in the data table.
dt<<Get Labeled Columns
dt<<Get Labelled Columns
Returns the currently labeled columns in the data table.
Example
In PopAgeGroup.jmp, the Country and Year columns are labeled. The following script returns a list of the labeled column names.
dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" );
dt << Get Labeled Columns;
{:Country, :Year}
dt<<Get Labeled Rows
dt<<Get Labelled Rows
Returns the currently labeled rows in the data table.
dt<<Get Name
Returns the name of the table.
dt<<Get Path
Returns the absolute path for the JMP data table. Note that this function is not for imported data that is not saved yet.
dt<<Get Property("name")
Returns the script in the property name.
dt<<Get Row Change Function
Returns the expression that is evaluated when a row is selected.
dt<<Get Row ID Width
Returns the row ID display width in pixels.
dt<<Get Row States
Returns a vector containing the row state for every row in the data table or data filter.
dt<<Get Rows Where(WHERE clause)
Returns the rows in the data table that match the specified where criteria. Some examples are as follows:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Get Rows Where( :sex == "M" );
dt << Get Rows Where( :sex == "M" & :age < 15 );
dt<<Get Script
Returns as an expression a script to recreate the data table.
dt<<Get Selected Columns(<"string">)
Returns a list of selected columns as column references. Include the "string" argument to return the selected columns in a string.
Examples
dt << Get Selected Columns();
{:age, :sex, :height}
dt << Get Selected Columns( "string" );
{"age", "sex", "height"}
dt<<Get Selected Rows()
Returns the selected rows.
dt<<Get Table Script Names()
Returns a list of the names of all the scripts and properties in the data table.
dt<<Get Table Variable("name")
Returns the value from the variable or script name.
dt<<Get Table Variable Names()
Returns a list of the names of all the variables in the data table.
dt<<Go To Row(n)
Locates and selects row number n in dt.
dt<<Group Columns({col1, col1, ...})
dt<<Group Columns("group name", col, n)
Groups the columns specified under the specified group name. You can provide either a list of columns to group, or a column name and the number of columns to group. In the latter case, the number n specifies to group the column given with the n-1 columns that follow.
dt<<Hide
dt<<Unhide
Toggles selected rows in dt from hidden to unhidden or vice versa.
dt<<Invert Row Selection
Selects any row currently deselected and deselects any row currently selected.
dt<<Is Dirty
Returns 1 if the table has been modified from its saved state. Otherwise, returns 0.
dt<<Join(With(table), <Private>, <Invisible>, Select(columns), Select With(columns), (By Matching Columns(col1=col2, ...)|Cartesian|By Row Number), <Merge Same Name Columns>, <Match Flag>, <Copy Formula(Boolean)>, <Suppress Formula Evaluation(Boolean)>, Update, <Drop Multiples(Boolean, Boolean)>, <Include Non Matches(Boolean, Boolean)>, <Preserve Main Table Order>, <Output Table Name("name"))>
Description
Combines data tables dt and table side to side. For details about joining tables, see the Reshape Data chapter in the Using JMP book.
Returns
A data table.
Arguments
Private
Optional. Does not open the resulting data table. Using private data tables saves memory for smaller tables. However, for large tables (for example, 100 columns and 1,000,000 rows), using a private data table is not helpful the data requires a lot of memory.
Invisible
Optional. Opens the data table but hides it. The table is in the JMP Home Window’s Window List.
With(dataTable)
The secondary data table.
Select(columns)
Selects the columns from the main table to be added to the output table. Optional.
Select With(columns)
Selects the columns from the secondary table to be added to the output table.
By Matching Columns(col1=col2, ...)|Cartesian|By Row Number
Determines the method for joining the tables. By Matching Columns(col1=col2, ...) updates the first table with data from second table (the default method). Cartesian joins two tables using a Cartesian method, where it forms a new table consisting of all possible combinations of the rows from two original tables. JMP crosses the data in the first table with the data in the second to display all combinations of the values in each set. By Row Number joins the two tables side by side. By Matching Columns is the default value.
Merge Same Name Columns
Optional. Merges columns with the same name. Off by default.
Match Flag
Optional. Off by default. Omits the Match Flag column from the joined data table when you are matching by column.
Copy Formula(Boolean for main table, Boolean for secondary table)
Optional. Copies the formulas from the table that you are joining. On by default.
Suppress Formula Evaluation()
Optional. Prevents JMP from evaluating columns’ formulas during the creation of the new table. On by default. Use Suppress Main Table Formula Evaluation to suppress evaluation only in the main table. Use Suppress Second Table Formula Evaluation to suppress evaluation only in the secondary table.
Update
Optional.Replace the data in the main table with the corresponding data from the secondary table.
Drop Multiples(Boolean for main table, Boolean for secondary table)
Optional. Includes all rows from the data table, even when there is no matching value. If you do not check the boxes associated with Drop multiples in either table, a Cartesian join is performed within each group of matching column values. Off by default.
Include Non Matches(Boolean for main table, Boolean for secondary table)
Optional. Includes non-matching columns. Off by default.
Preserve Main Table Order
Optional. Maintains the order of the original data table in the joined table, instead of sorting by the matching columns. On by default.
Output Table Name("name"))
Optional. The name of the resulting table.
dt<<Journal
Makes a journal from the data table. Only the data grid is included, not notes, variables, or scripts.
dt<<Journal Link
Adds a link to the data table in the current journal. If a journal does not exist, a new one is created.
dt<<Label
dt<<Unlabel
Toggles selected rows in dt from labeled to unlabeled or vice versa.
dt<<Last Modified
Returns the date on which the data table was last saved.
dt<<Layout
Makes a layout window from the data table. Only the data grid is included, not notes, variables, or scripts.
dt<<Lock Data Table
Locks the data table so that data and column properties cannot be added or changed.
dt<<Make Indicator Columns( <Prepend Column Name(Boolean)>, <Include Missing(Boolean)>);
Creates indicator columns of 0 and 1 values for the specified categorical column.
Example
The following example creates indicator columns for the sex column. Prepend Column Name creates columns named sex_F and sex_M. Otherwise, the columns are named after each level (F and M). Include Missing includes missing values.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Make Indicator Columns(
Columns( :sex ),
Prepend Column Name( 1 ),
Include Missing( 1 )
);
dt<<Make RowState Handler
Creates a row state handler function. The argument of the function holds the rows whose row states get changed.
dt<<Make SAS Data Step
Returns the data table as a SAS Data Step.
dt<<Make SAS Data Step Window
Returns the data table as a SAS Data Step and places it in a SAS script window.
dt<<Marker by Column(col)
Assigns markers according to the values of a data table column.
dt<<Markers(n)
Assigns marker n to the selected rows.
dt<<Maximize Display
Forces the data table to remeasure all of its columns and zoom to the best-sized window.
dt<<Move Selected Columns("To First"|"To Last"|After(col))
Moves the selected columns in the data table to the specified position.
dt<<Move Rows("At Start"|"At End"|After(n))
Moves the selected rows in the data table to the specified position.
dt<<New Column("name", attributes)
Adds a new column named "name" after the last column in dt. Can also be used as a function: New Column("name", attributes).
dt<<New Data Box()
Makes a data table view in a display box tree. Useful for displaying the data table and report in one window. A data browser box is created when you send the New Data Box message to the data table object.
Example
The following script creates a data table view and report in one window. The data table is placed in a data browser box. The width of that box is set to 800 pixels. Because auto stretch is turned off, the data table view remains 800 pixels wide even if you stretch the right border of the window.
dtA = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp", invisible );
nw = New Window( "Example",
H List Box(
V List Box( dtbox = dtA << New Data Box() ),
dtA << Distribution(
Continuous Distribution( Column( :NPN1 ) ),
Continuous Distribution( Column( :PNP1 ) )
)
)
);
dtbox << Set Auto Stretching( 0, 0 ) << Set Width( 800 );
dt<<New Data View
Opens a duplicate of the data table. The second data table is identical to and linked to the original data table, so that any changes made in one are reflected in the other. Closing either data table also closes the other and all references to the data tables are deleted.
This can be useful to show an invisible data table.
dt<<New Script("name", script)
dt<<Set Property("name", script)
Creates a new table property using the specified name that stores the specified script.
Use New Script() or Set Property() rather than the deprecated New Property() and New Table Property().
dt<<New Table Variable("name", value)
dt<<Set Table Variable("name", value)
Creates a new table variable with the specified name and value.
dt<<Next Selected
Scrolls data table down to show the next selected row that is not already in view.
dt<<Original Order
Restores saved order of columns in dt.
dt<<Previous Selected
Scrolls data table up to show the previous selected row that is not already in view.
dt<<Print Window(<"Show Dialog">)
Prints the window. If the optional argument "Show Dialog" is specified, the print window is displayed. Otherwise, the window is printed to the default printer using the current settings, and no print window is displayed.
dt<<JMP Query Builder
Builds a query containing one or more data tables.
dt<<Reorder By Data Type
Reorders columns in dt, row state first, then character, then numeric.
dt<<Reorder By Modeling Type
Reorders columns in dt to continuous, then ordinal, then nominal.
dt<<Reorder By Name
Reorders columns in dt to alphanumeric order by name.
dt<<Rerun Formulas
Recalculates all formula-based data table variables. Recalculations are performed in the proper dependency order.
dt<<Reverse Order
Reverses columns in dt from current order.
dt<<Revert
Reverts to the most recently saved version of dt.
dt<<Run Formulas
Performs all pending formula evaluations, including evaluations that are pending as a result of evaluating other formulas.
dt<<Run Script("name")
Finds the table property name and runs it as a JSL script.
dt<<Save("path")
dt<<Save As("path")
Saves the table under the "path" given.
For information about supported formats, see the Import Your Data chapter in the Using JMP book.
dt<<Save Database("connection_information", "table_name", <Replace>)
Save the data table to the database named using the connection and table name specified. The Replace option replaces the existing database with the current database.
dt<<Save Script to Script Window
Saves a script to reproduce the data table in a Script Journal window.
dt<<Select All Rows
Selects all rows in the data table.
dt<<Select Excluded
Selects only those rows in the data table that are currently excluded.
dt<<Select Hidden
Selects only those rows in the data table that are currently hidden.
dt<<Select Labeled
Selects only those rows in the data table that are currently labeled.
dt<<Select Randomly(p|n)
Randomly selects the given percentage p of the rows in the data table, or the number of rows n.
dt<<Select Rows({list})
Selects the rows given in the list of row numbers.
dt<<Select Where(condition)
Selects the rows in dt where the condition evaluates as true.
dt<<Set Dirty(Boolean)
Marks the data table as changed, even if no changes have been made.
dt<<Set Header Height(num)
Sets the column header’s display height to the number of specified pixels.
dt<<Set Label Columns(column_1, ...)
Assigns the specified columns as label columns.
dt<<Set Matrix(matrix)
Inserts matrix into a data table, adding new columns and rows as necessary.
dt<<Set Name("name")
Gives a "name" to the table.
dt<<Set Property("name", script)
dt<<Set Label Columns("name", ...)
dt<<Set Label Columns
Turns on the Label attribute for the specified columns. If no columns are listed, turns Label attribute off.
dt<<Set Row ID Width(expr)
Sets the row ID display width to the expr in pixels.
dt<<Set Row States(matrix)
Sets the row states for all rows in the data table.
dt<<Set Scroll Lock Columns("name", ...)
Locks scrolling for the specified columns. If no columns are listed, unlocks scrolling.
dt<<Set Table Variable("name", value)
dt<<Sort(By(columns), order("Descending" or "Ascending"), Output Table Name("name"))
Creates a new table ("name") by rearranging the rows of dt according to the values of one or more columns.
dt<<Split (Split(column), Split by(column), Group(column), <Private> | <Invisible>, <Remaining Columns(Keep All | Drop All | Select(columns))>, <Copy formula(0|1)>, <Suppress formula evaluation(0|1)>, <Sort by Column Property("Value Ordering" {"string", "string"} | "Row Order Levels")>, <Output Table ("name")>)
Un-stacks multiple rows for each Split column into multiple columns as identified by the Split by column. The Split and Split by arguments are required.
dt<<Stack(Stack(columns), ID(columns), Stacked(newcol), Output Table Name("name"))
Creates a new table ("name") by combining the values from several columns in dt into one column newcol.
dt<<Subscribe( "keyname"(<"client">), On Delete Columns | On Add Columns | On Add Rows | On Delete Rows | On Rename Column | On Close | On Save | On Rename ( function ) )
Subscribes to a data table to get messages regarding changes in the data table.
dt<<Subset(Columns(columns), Rows(matrix), Linked, Table Name("name"), Copy Formula(1|0), Suppress Formula Evaluation(1|0), Sampling Rate(rate))
Creates a new table ("name") from the rows that you specify in dt.
dt<<Summary(<Private>, <Invisible>, Group(column), Subgroup(column), <N>, <Mean(column)>, <Std Dev(column>, <Min(column)>, <Max(column)>, <Range(column)>, <Sum(column)>, <CV(column)>, Freq(<freq column>), Weight(<weight column>), Include marginal statistics, Link to original data table(0), statistics column name format("stat(column)" | "column" | "stat of column" | "column stat")
Creates a new table of summary statistics for the col that you specify, according to groups and subgroups.
dt<<Suppress Formula Eval(Boolean)
Turns off automatic calculation of formulas for data table dt.
dt<<Text to Columns
Makes a set of text columns or indicator columns from a delimited text column.
Example
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << Text To Columns(
delimiter( "," ),
columns( :Brush Delimited )
);
dt<<Transpose(Columns(columns), Rows(matrix), Output Table Name("name"))
Creates a new table ("name") from the rows and columns that you specify.
dt<<Ungroup Columns({col1, col1, ...})
Ungroups the columns defined in the list argument.
dt<<Unsubscribe("keyname", On Delete Columns | On Add Columns | On Add Rows | On Delete Rows | On Close | On Col Rename | All)
Releases any previous subscriptions to the data table.
Columns
col<<Add Column Properties ("name", expression)
Adds the property "name" with the expression given. You can add any standard column property by name or a user-specified property.
col<<Add From Row States
Updates a row state column with any currently used row state changes that are not the default state.
col<<Add To Row States
Copies all row state values in a column that are not the default state to the currently used row state in the data table.
col<<Color Cells("color")
Colors the cells of the column within the data table grid. Use any quoted named color or 0 to clear the color.
col<<Color Cell by Value(Boolean)
Colors the cells of the column in the data table grid using the value color property.
col<<Copy Column Properties
Copies the column properties into the buffer.
col<<Copy From Row States
Copies all row state values currently used in the data table to a column.
col<<Copy to Row States
Copies all row state values in the column to the currently used row state in the data table.
col<<Data Type("type")
Sets the "type" for col; choices are "Numeric", "Character", "Rowstate".
col<<Delete Formula
Delete the formula from a column.
col<<Delete Property(name)
col<<Delete Column Property(name)
Delete the property name from a column.
col<<Eval Formula
Forces the formula to evaluate (perhaps again).
col<<Exclude(0|1)
Turns the excluded or unexcluded state on, depending on the Boolean argument.
col<<Format("format", <width>, <decimal>, <"Use Thousands Separator">)
Sets the numeric display format specified.
col<<Formula(expression)
Sets the formula for the variable and evaluates it.
col<<Get Column Field Width
Returns the field width used for displaying data in the column.
col<<Get Data Type
Returns the data type of col.
col<<Get Format
Returns the format of the column.
col<<Get Formula
Returns the formula.
col<<Get Input Format
Returns the format used for input and storing of data for the column.
col<<Get List Check
Returns the list check definition. If list check is not defined for the column, a message is sent to the log stating so.
col<<Get Lock
Returns the current Lock setting.
col<<Get Modeling Type
Returns the modeling type of the column ("Continuous" or "Ordinal" or "Nominal").
col<<Get Name
Returns the name of the column.
col<<Get Property
Returns the specified property definition. If the specified property is not defined for the column, a message is sent to the log stating so.
col<<Get Range Check
Returns the range check definition. If range check is not defined for the column, a message is sent to the log stating so.
col<<Get Role
Returns the preselected role of col.
col<<Get Script
Returns the script to reproduce the column.
col<<Get Selected
Returns 1 if the column is selected, or 0 otherwise.
col<<Get Value Labels
Returns the value labels definition. If value labels is not defined for the column, a message is sent to the log stating so.
col<<Get Use Value Labels
Returns 1 if the value labels are set to be used for the column, or 0 otherwise.
col<<Get Values
Returns the values in the column.
col<<Hide(Boolean)
Turns the Hide attribute on or off according to the Boolean argument given.
col<<Ignore Formula Error
Ignores formula evaluation errors in a column, and sets the cell value to missing when a formula error occurs.
col<<Input Format("format")
Sets the format used for input and storage for the column. The argument is the name of any JMP format (for example, "ddmmyyyy" for a date column).
date_col<<Is Transformed On SAS Export
Returns true if the data in the resulting SAS data set for the date column will be changed when it is exported to SAS.
col<<Label(Boolean)
Turns the Label attribute on or off according to the Boolean argument given.
col<<Lock(Boolean)
col<<Set Lock(Boolean)
Turns the Lock attribute on or off according to the Boolean argument given.
col<<Preselect Role("role")
Preselects the role for the column. Choices are "Y", "X", "Weight", "Freq", and "None", or "No Role".
col<<Set Scroll Locked(Boolean)
Turns the Scroll Lock attribute on or off according to the Boolean argument given.
col<<Set Display Width(n)
Sets the column display width to the n in pixels.
col<<Set Each Value(n)
Sets all the values in the column to n.
col<<Set Field Width(n)
Sets the field width for the column to n.
col<<Set Modeling Type("type")
Sets the modeling type for the variable. Choices are "Continuous", "Ordinal", or "Nominal".
col<<Set Name("name")
Sets the name for the column.
col<<Set Property ("name", {argument list})
Sets the property "name" to the expression given. You can set any standard column property by name or a user-specified property.
col<<Set Selected(Boolean)
Sets the column to be selected (true or 1) or not selected (false or 0).
col<<Set Values([matrix] or {list})
col<<Values([matrix] or {list})
Sets values for the matrix (for numeric variables) or list (for character variables).
col<<Suppress Eval(Boolean)
Turns off automatic calculation of formulas for the column.
Rows
row<<Colors(n)
Assigns the color n to the selected rows.
row<<Exclude(0|1)
row<<Unexclude(0|1)
Turns the excluded or unexcluded state on for the selected rows according to the Boolean argument given. Omit the argument to toggle the row state.
row<<Hide(0|1)
row<<Unhide(0|1)
Turns the Hide attribute on or off according to the Boolean argument given. Omit the argument to toggle the row state.
row<<Label(0|1)
row<<Unlabel(0|1)
Turns the Label attribute on or off according to the Boolean argument given. Omit the argument to toggle the row state.
row<<Markers("marker")
Assigns the "marker" to the selected rows.
row<<Next Selected
Causes the next selected row in the data table to blink.
row<<Previous Selected
Causes the previous selected row in the data table to blink.
row<<Row Editor
Opens the Row Editor window for the selected rows.
Data Filter
dtf<<Add Filter(columns(column <,col>), <Where(clause)>)
Add one or more filter columns in a new OR group.
dtf<<Auto Clear(0|1)
Clears all currently selected rows before setting a new selection.
dtf<<Clear
Clears the currently selected rows.
dtf<<Close
Closes the data filter window.
dtf<<Columns(col1, col2, ...)
Sets the columns to use in the data filter.
dtf<<Data Table Window
Shows the data table that the data filter window is using.
dtf<<Delete All
Removes all filters that are set.
dtf<<Delete(col1, col2, ...
Removes the specified columns from the data filter.
dtf<<Display(col, <Size(x, y)>, "Blocks Display"|"List Display"|"Single Category Display"|"Checkbox Display")
Sets how the specified categorical column levels are displayed in the filter. The specified column must be categorical.
dtf<<Get Script
Returns a scriptable object that you can send messages to.
Example
Open( "$SAMPLE_DATA/Big Class.jmp" );
df = dt << Data Filter(
Add Filter( Columns( :age, :sex ), Where( :age == 12 ) )
);
 
txt = df;
txt << ( Filter Column( :sex ) << Where( :sex == "M" ) );
dtf<<Local Data Filter
Embeds the data filter in the specified window.
dtf<<Location(x, y)
Moves the data filter window to the specified location. X and y are measured in pixels. 0,0 is the top left of the monitor.
dtf<<Make Subset
Creates a new subset data table that contains the rows that are selected in the data filter.
dtf<<Match(Filter Columns(:col1, :col2, ...), Where(WHERE clause)
Sets the filter conditions for each column. The WHERE clause is used for all the columns listed. To use different WHERE clauses for different columns, send the Match message separately for each column.
dtf<<Mode(Select(0|1)|Show(0|1)|Include(0|1))
Sets the action, or mode, that is used when rows are selected using the data filter.
dtf<<Save and restore current row states
Saves the current row states for the data table, and then restores those states when the data filter is closed.
dtf<<Show Columns Selector(0|1)
Displays or hides the column selector after completing a filter.
dtf<<to Clipboard
Creates a WHERE clause from the current state of the data filter and places it on the clipboard, where it can be pasted elsewhere.
dtf<<to Data Table
Creates a WHERE clause from the current state of the data filter and saves it as a property to the data table.
dtf<<to Journal
Creates a WHERE clause from the current state of the data filter and appends it to the current journal. If there is no current journal, a new journal is opened and the WHERE clause is added to it.
dtf<<to Row State Column
Creates a row state column whose formula is the WHERE clause.
dtf<<to Script Window
Creates a WHERE clause from the current state of the data filter and appends it to the current script window. If there is no current script window, a new script window is opened and the WHERE clause is added to it.
dtf<<Use Floating Window(0|1)
Sets whether the data filter window floats on top of its associated data table or behaves as a normal window.
dtf<<Where(WHERE clause)
Sets a condition for selecting rows.
Databases
dt<<Save Database("connectInfo", "TableName")
Saves a data table to a database.
Datafeed
feed<<Close
Closes the Datafeed object and its window.
feed<<Connect(portSettings)
(Windows only) Sets up port settings for the connection to the device.
feed<<Disconnect
(Windows only) Disconnects the device from the Datafeed queue but leaves the Datafeed object active.
feed<<Get Line
Returns and removes one line from the Datafeed queue.
feed<<Get Lines
Returns as a list and removes all lines from the Datafeed queue.
feed<<Queue Line(string)
Sends one line to the end of the Datafeed queue.
feed<<Restart
Restarts processing queued lines.
feed<<Set Script(script)
Assigns the script that is run each time a line of data is received.
feed<<Stop
Stops processing queued lines.
Display Boxes
For additional examples, see the Display Trees chapter in the Scripting Guide.
All Display Boxes
db<<Add Text Annotation(Text("string"), Text Box(x1, y1, x2, y2))
Draws a text annotation box that contains the string. The Text Box argument controls where the text annotation box is drawn in relation to the display box, from the upper left corner to the lower right corner.
db<<Append(db2)
Add db2 to the display tree after db.
db<<Child
Returns the child of the box.
db<<Class Name
Returns the name of the display class for the box.
db<<Clone Box
Makes a new copy of the display box.
db<<Close Window
Closes the containing window.
db<<Copy Picture
Puts a picture of the box on the clipboard.
db<<Delete
Delete the display box
db<<Enable(Boolean)
Controls the ability to interact with the display box. 0 disables the display box. 1 enables the display box.
db<<Get HTML
Returns a string containing HTML source for the box.
db<<Get Journal
Returns a string containing journal source for the box.
db<<Get Menu Item State(index)
Returns the popup menu item state of the index menu item. The state can be normal (0), checked (1), or disabled (-1).
db<<Get Menu Items
Returns the menu items used for popup menu when the button is clicked. For submenus see <<Get Submenu(index).
db<<Get Menu Script
Returns the menu script attached to the calling object.
db<<Get Page Setup()
Returns the page setup settings.
Example
The example below creates a new window and returns the page setup configuration.
w = New Window( "Window",
Text Box( "Page Setup Test" )
);
w << Get Page Setup();
The results of the message:
{Margins( {0.75, 0.75, 0.75, 0.75} ), Scale( 1 ), Portrait( 1 ),
Paper Size( "Letter" )}
db<<Get Picture( <Scale(n)> )
Captures db as a picture object. The scale is a factor of the original picture size. For example, Scale(2) makes the picture object twice as large.
db<<Get RTF
Returns a string containing RTF source for the box.
db<<Get Script
Returns the script for recreating the display box.
db<<Get Size
Returns either { x, y } or { h, v } in pixels:
xy = DisplayBox << Get Size;
Returns x and y in pixels:
{ x, y } = DisplayBox << Get Size;
db<<Get Submenu (index)
Returns the number of submenu items under the given menu item.
Example
The example below creates a menu containing “A”, “B”, and “C” with “A” having a submenu “A1” and “A2” and “B” having a submenu “B1”, “B2”, and “B3”. <<Get Submenu(inc) returns the number of submenu items under each indexed menu item.
New Window( "Title",
obj = Outline Box( "title" ) );
submenus = { };
obj << Set Menu Script(
{"A", "", "A1", Print( "A1" ), "A2", Print( "A2" ),
"B", "", "B1", Print( "B1" ), "B2", Print( "B2" ), "B3", Print( "B3" ),
"C", Print( "C" )}
);
obj << Set Submenu( 1, 2 ); // menu A with 2 items in submenu A1 and A2
obj << Set Submenu( 4, 3 ); // menu B with 3 items in submenu B1, B2, and B3
For( inc = 1, inc <= N Items( Words( obj << Get Menu Script, "," ) ), inc++,
Insert Into( submenus, obj << Get Submenu( inc ) );
);
submenus;
{2, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
The log output indicates that index(1) contains two submenu items and index(3) contains three submenu items.
db<<Get Text
Returns a string containing the text of the box.
db<<Horizontal Alignment("position")
Aligns a child display box inside the display parent box according to the specified position. The default value is left, or you can specify center or right.
Example
New Window( "Example",
Outline Box( "Parent display box",
Button Box( "OK", <<Horizontal Alignment( "Center" ) )
)
);
db<<Inval
Invalidates the display box area in the window. The window is updated the next time the operating system has an opportunity to update windows (for example, when the user resizes the display box).
Notes
Consider including the new message <<Update Window rather than including Wait(0). The problem with using Wait(n) is knowing how large n should be.
Many display box messages, such as <<Set Text, automatically mark the box as invalid, so the <<Inval message is usually unnecessary. Some interactive scripts that use sliders with JSL callbacks may need <<Update Window to keep various parts of the display synchronized with the slider.
db<<Is Enabled
Returns the enabled state of the control. The message is supported in Busy Light Box(), Button Box(), Calendar Box(), Check Box(), Col List Box(), Combo Box(), Completion Box(), Filter Col Selector(), gtext(), List Box(), Number Edit Box(), Popup Box(), Radio Box(), Range Slider Box(), Slider Box(), Spin Box(), Text Edit Box(), Tree Box(), Tree Map Box(), and Tree Map Seg().
db<<Journal
Appends the box to the journal.
db<<Journal Window
Appends the containing window of the display box to the journal; compare with Journal.
db<<Move Window(x, y)
Moves the window to the (x,y) location on your screen.
db<<Page Break
Inserts a page break before the box.
db<<Parent
Returns the parent of this display box.
db<<Prepend(db2)
Add db2 to the display tree before db.
db<<Reshow
Invalidates the display box’s area in the window and immediate removes invalid areas from the window.
db<<Save Capture("path", <"format">, <Add Sibling(n)>)
Saves the display box as a graphic to the specified "path" in the specified "format". The optional Add Sibling argument adds the number of sibling display boxes to include in the capture. The default value is 1, which captures only the specified display box. Note that the specified portion of the report is not guaranteed to be scrolled into view or unobstructed by other windows. If the display box is not visible, the saved graphic will not contain the contents that you expect.
db<<Save HTML("" | "path", "format")
Saves HTML source and folder of graphics in "format" specified.
db<<Save Interactive HTML( "path" )
Saves the display box as a web page that includes interactive HTML 5 features. Non-JMP users can then explore the data.
Examples
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( y( weight ), x( height ) );
rbiv = (biv << Report);
rbiv << Save Interactive HTML( "$DOCUMENTS/MyInteractiveHTML.htm" );
db<<Save Journal("" | "path")
Saves journal source for the box.
db<<Save MSWord("pathname", Native)
Saves the display box as a Microsoft Word document. (Windows Only)
db<<Save Picture("" | "pathname", "format")
Saves a picture of the box.
Notes
Valid file formats include PNG, GIF, JPG or JPEG, and EMF.
On Windows, the Windows Specific preferences determine the resolution (or DPI), or you can run the following script:
Pref( Save Image DPI( <number> ) );
On Macintosh, the operating system determines the DPI.
db<<Save Presentation("path", <template("path")>, <(Insert("Begin"|"End"|N) | Replace("Begin"|"End"|N) | "Append")>, <Outline Titles("None"|"Hide"|"TopLeft"|"TopRight"|"BottomLeft"|"BottomRight")>, <format>)
Saves display boxes in a Microsoft PowerPoint presentation. You can open the file in any presentation software program.
Arguments
path
The quoted location of the saved file. You must include the .pptx extension in the filename. An existing file with the same name is overwritten.
template
Optional. The quoted path name and file name of a custom PowerPoint template. Without this argument, JMP uses the default template located in the pptx folder of the installation directory.
Include a simple table in your template, or a default table format is applied to report tables. For an example on Windows, see /pptx/JMPExportTemplate.pptx in the JMP installation folder.
Insert
Optional. Determines where the slides are inserted in an existing presentation.
n inserts the slides as the nth slide number.
"Begin" inserts the slides at the beginning of the presentation.
"End" inserts the slides at the end of the presentation.
Replace
Optional. Determines which slides are replaced in an existing presentation. The arguments are n, "Begin", and "End" as described for Insert.
Append
Optional. The slides are inserted at the end of an existing presentation.
Outline Titles
Optional. The location of the outline titles on the slide. By default, outline titles appear in the bottom left corner of the slide.
"None" omits the slide title above the graphic and the outline titles.
"Hide" omits the outline titles.
"TopLeft", "TopRight", "BottomLeft", "BottomRight" determine the position of the outline titles on the slide. The outline title and its parent titles are included.
format
Optional. The quoted format of the embedded graphics. Options are "Native", "EMF", "PNG", "JPG", "BMP", "GIF", "TIF". On Windows, the native format is EMF. On Macintosh, the native format is PDF. See “Notes” for compatibility issues. Without this argument, JMP applies the “Image Format for PowerPoint” General preference.
Notes
Windows does not support the native PDF graphics produced on Macintosh. Macintosh does not support the native EMF graphics produced on Windows. For cross-platform compatibility, specify "PNG", "JPG", "GIF", or "TIF".
db<<Save RTF("" | "pathname", "format")
Saves RTF source with graphics in "format" specified.
db<<Save Text("" | "pathname", "format")
Saves a file containing the text of the box.
db<<Scroll Window(x, y)
Scrolls the containing window.
db<<Select
db<<Deselect
Selects (highlights) or deselects the box.
db<<Set Menu Item State(index, 0 | 1 | -1)
Sets the popup menu item at index to be normal (0), checked (1), or disabled (-1).
db<<Set Page Setup<margins(left, right, top, bottom)>, <scale(s)>,<portrait(Boolean)>, <paper size("paper"))
db<<Set Page Setup<margins({left, right, top, bottom})>, <scale(s)>,<portrait(Boolean)>, <paper size("paper"))
Sets the page settings. Margins are set in inches. Scale variable s is a number in the range of 10 (for 1000%) to 0.2 (for 20%) with the default as 1 (for 100%). If portrait is True the page is oriented for portrait, otherwise the page is landscape. Paper size is a string specifying the paper size, for example, "Letter" or "Legal".
Example
The example below creates a new window and configures the page setup.
w = New Window( "Window",
Text Box( "Page Setup Test" )
);
w << Set page setup(
margins( 1, 1, 1, 1 ),
scale( 1 ),
portrait( 1 ),
paper size( "Letter" )
);
db<<Set Submenu (index, submenu count)
Sets the submenu items for the item (specified by index number) by specifying the number of items in the submenu.
Example
The example below creates a menu containing “A”, “B”, and “C” with “A” having a submenu “A1” and “A2” and “B” having a submenu “B1”, “B2”, and “B3”.
New Window( "title", ob = Outline Box( "title" ) );
ob << Set Menu Script(
{"A", "", "A1", Print( "A1" ), "A2", Print( "A2" ),
"B", "", "B1", Print( "B1" ), "B2", Print( "B2" ), "B3", Print( "B3" ),
"C", Print( "C" )}
);
ob << Set Submenu(1, 2); // menu A with 2 items in submenu A1 and A2
ob << Set Submenu(4, 3); // menu B with 3 items in submenu B1, B2, and B3
db<<Set Report Title("title")
Sets a new title.
Show Properties(db)
Shows the messages a given display box can interpret.
db<<Sib
Returns the sibling of the box.
db<<Sib Append(db2)
Appends a display as a sibling to this one. The argument must evaluate to a display box owner or reference.
db<<Size Window(x, y)
Resizes the containing window.
db<<Update Window
Updates the window that holds the display box (and possibly other windows as well, depending on the operating system) if there are invalidated regions. Previously invalidated box areas are redrawn with their new content.
Notes
In some interactive JSL scripts that combine sliders with JSL callbacks, you might need to use <<Update Window to keep parts of the display synchronized with the slider.
db<<Zoom Window
Resizes the window to be large enough to show all of its contents.
Axis Boxes
axis box<<Axis Settings(<named_arguments>)
Opens the axis specification window or specifies axis settings such as tick marks and axis labels.
If no arguments are included, the axis specification window appears.
Otherwise, specify named arguments for each axis.
Specify the Y axis as axis box(1).
Specify the X axis as axis box(2).
The following example creates a bivariate plot and defines settings for the X and Y axes.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( X( :height ), Y( :weight ), FitLine );
rbiv = biv << Report;
xaxis = rbiv[axis box( 2 )];
yaxis = rbiv[axis box( 1 )];
xaxis << Axis Settings( Show Major Grid( 1 ) );
yaxis << Axis Settings( Decimal( 10, 3 ) );
axis box<<Add Axis Label("string")
Adds an axis label with the specified string.
axis box<<Add Ref Line(number, "linestyle", <"color">, <"label">, <width>)
Adds a reference line at number in the linestyle ("Solid" | "Dashed" | "Double"), "color" (using "color name" or index number), "label", and width (in pixels) specified. Note: When a reference line is added that uses the same "label" as an existing reference line, the existing reference line is removed and the new line added.
axis box<<Decimal(width, decimalplaces)
Changes the numeric format for axis values.
axis box<<Format("name")
Changes to the numeric format given by "name".
axis box<<Get Inc(n)
Gets the increment value of the axis.
axis box<<Inc(n)
Sets the increment between ticks.
axis box<<Interval("format")
Specifies the units used for Inc() with date/time formats: "Numeric", "Year", "Quarter", "Month", "Week", "Day", "Hour", "Minute", or "Second".
axis box<<Label Orientation("format")
Description
Rotates the axis label to one of the following quoted formats: "Automatic" (based on the width of the label), "Horizonal", "Vertical", "Perpendicular", "Parallel", and "Angled".
axis box<<Major Grid Line Color("color")
Sets the color for the major grid (if enabled) using either the "color name" or index number.
axis box<<Max(max)
Changes the maximum value on the axis.
axis box<<Minor Grid Line Color("color")
Sets the color for the minor grid (if enabled) using either the "color name" or index number.
axis box<<Min(min)
Changes the minimum value on the axis.
axis box<<Minor Ticks(number)
Specifies the number of minor tick marks between major tick marks.
axis box<<Remove Axis Label
Removes any label added with Add Axis Label.
axis box<<Reverse Scale(Boolean)
Reverses the normal scale direction so that the highest value is on the left or bottom (that is, closest to the origin).
axis box<<Revert Axis
Restores the axis’ original settings (from time of creation).
axis box<<Scale("type")
Changes the scale of the axis to type ("Linear" | "Log" | "Exp Prob"| "Weibull Prob" | "Logistic Prob" | "Frechet Prob" | "Normal" | "Cube Root" | "Johnson Su Scale" | "Geodesic" | "Geodesic US" | "Custom Scale" | "Power").
If the type is Custom Scale, this message expects two additional clauses: Scale to Internal(expr) and Scale to External(expr).
axis box<<Tick Font("name", <size>, <"style" | "style style...">, "<angle>")
Sets the font name and properties for tick marks. To specify more than one style, include a space between each style and place them in quotes.
axis box<<Show Labels(Boolean)
Shows or hides labels for the axis values.
axis box<<Show Major Grid(Boolean)
Adds or removes grid lines at the major tick values.
axis box<<Show Major Ticks(Boolean)
Shows or hides major tick marks.
axis box<<Show Minor Grid(Boolean)
Adds or removes grid lines at the minor tick values.
axis box<<Show Minor Ticks(Boolean)
Shows or hides minor tick marks.
axis box<<Tick Label List(<i>, {"text1","text2", ...},{n1, n2, ...})
Sets the values and positions of the axis tick labels.
Note: Major tick increments are automatically set to 1.0.
The first (optional) integer, i, is the label row index. Leaving it out clears any existing label rows and creates one new one as specified. Including it allows you to override any particular label row; using an index higher than the current number of label rows adds a new label row on to the end.
The second list argument is the string titles for your labels.
The third list argument is optional and specifies the values corresponding to each label; if the value list is omitted, the labels will be on integer increments starting with 1.
Border Boxes
Note: Border boxes support only one display box argument.
border box<<Set Background Color( {R, G, B} | <"color">)
Sets the background color for a border box. Specify a "color name" or a list of RGB values. For example:
border box<<set background color("red");
or
border box<<set background color( {255, 192, 3} );
border box<<Set Color( {R, G, B} | <"color">)
Sets the border color for a border box. Specify a "color name" or a list of RGB values. For example:
border box<<set color("red");
border box<<Get Color
Gets the border color for a border box.
border box<<Set Style ("style")
Sets the border style for a border box. Specify the style as one of the following numbers or keywords: 0 ("Solid"), 1 ("Dotted"), 2 ("Dashed"), 3 ("DashDot"), or 4 ("DashDotDot"). For example:
border box<<Set Style("dotted");
border box<<Get Style
Gets the border style for a border box. For example:
border box<<Get Style;
Data Grid Boxes
dgb<<Set Data Table(<data_table>)
Sets the data table for the data grid box.
Frame Boxes
frame box<<Add Graphics Script(<order>,<"description">, <script>)
Description
Adds a script to draw graphics in the frame box.
Arguments
order
An optional argument that specifies the order in which the graphics elements are drawn. The value can be the keyword Back or Forward or an integer that specifies the drawing order for a number of graphics elements. 1 means the object is drawn first.
description
An optional string that appears in the Customize Graph window next to the graphics script.
script
An optional JSL script.
Example
In the following example, the graphics script draws the line first and then draws the other graphics elements: the grid lines, references lines, and markers that create the bivariate plot. Without the 1 order argument, the line is drawn last and covers up the markers.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Bivariate( Y( :weight ), X( :height ) );
Report( obj )[FrameBox( 1 )] <<
Add Graphics Script(
1, // draws the line first
Description( "Pen Script" ),
Pen Color( "red" );
Pen Size( 5 );
Y Function( 60 + 120 / 2 * (1 + Sine( (2 * Pi() * (x - 50)) / 22.5 )), x );
);
frame box<<Append Seg
Adds a display seg to the specified Frame Box.
frame box<<Background Color( {R, G, B} | <"color">)
Changes the background color. Specify a "color name" or a list of RGB values.
frame box<<Child Seg
Returns the display seg child of the Frame Box.
frame box<<Edit Graphics Script
Brings up a dialog box to view, edit, or delete the current graphics scripts.
frame box<<Find Seg
Returns a display seg with the specified argument (for example, the name of a seg).
frame box<<Frame Size(x, y)
Resets the size of the frame, in pixel units.
frame box<<Make table of graphs like this
Creates a data table of graphs.
frame box<<Marker Size(size)
Changes the marker size.
frame box<<Row Colors(color)
frame box<<Row Markers(marker)
frame box<<Row Exclude
frame box<<Row Hide
frame box<<Row Label
Forwards commands to the data table associated with the report, so that the row states of selected rows can be manipulated. For <<Row Exclude, <<Row Hide, and <<Row Label, omitting the argument toggles the option. If the option is off, the message turns it on. If the option is on, the message turns it off.
frame box<<X Axis(min, max, inc, named arguments)
Scales the X coordinate system.
frame box<<Y Axis(min, max, inc, named arguments)
Scales the Y coordinate system.
Matrix Boxes
matrix box<<Get
Returns the matrix contents.
matrix box<<Make Into Data Table(<Invisible(Boolean)>)
Turns the matrix into a new data table. The optional argument Invisible(), if True, hides the data table from view but shows it in the Window List pane. If False, the Invisible() argument shows the data table and it is listed in the Window List pane.
matrix box<<Set Format(width, decimalplaces)
Sets the numeric format for matrix elements.
matrix box<<Sort(column_num, ascending_bool)
Sorts the rows of the matrix based on the column number specified by column_num. The default sort order is ascending.
If column_num is 0, the sort is removed.
If ascending_bool is "True", the sort is performed in ascending order. If ascending_bool is "False", the sort is in descending order.
Nom Axis Boxes
nom axis box<<Divider Lines(Boolean)
Adds or removes divider lines between labels in the axis box.
nom axis box<<Lower Frame(Boolean)
Adds or removes a lower frame around the axis.
nom axis box<<Rotated Tick Labels(Boolean)
Rotates or unrotates the labels at each tick value.
Number Col Boxes
number col box<<Add Element(item)
Adds the item to the Number Col Box. Item can be a single number, a list of numbers, or a matrix of numbers.
number col box<<Get
number col box<<Get(i)
Gets the values in a list, or the i th value.
number col box<<Get As Matrix
Gets the values in a matrix, specifically a column vector.
number col box<<Get Format
Returns the current format (width, decimalplaces). A decimalplaces > 100 indicates date/time values.
number col box<<Get Heading
Returns the column heading text.
number col box<<Set Format(width, decimalplaces)
number col box<<Set Format("format", width)
Sets the format. Set decimalplaces > 100 for date/time values. Set decimalplaces = 97 for p-value format.
For example,
<< Set Format( 10, 2)
<< Set Format( "Scientific", 10 )
number col box<<Set Heading("string")
Changes the column heading text.
Outline Boxes
outline box<<Close(Boolean)
Closes the outline box.
outline box<<Close All Below
Closes all the node’s child nodes.
outline box<<Close All Like This
Closes all nodes similar to this outline box.
outline box<<Close Where No Outlines
Closes all nodes that do not have children.
outline box<<Get Title
Gets the title of the outline box.
outline box<<Horizontal(Boolean)
Horizontally aligns the node’s children.
outline box<<Open All Below
Opens all the node’s child nodes.
outline box<<Open All Like This
Opens all nodes similar to this outline box.
outline box<<Set Menu Script({"string1", script1,"string2", script2, ...})
Adds an entry to the menu when the red triangle on an outline box is selected.
outline box<<Set Title("text")
Changes the title of the outline box.
Panel Boxes
panel box<<Get Title
Gets the title of the panel box.
panel box<<Set Title("text")
Changes the title of the panel box.
Plot Col Boxes
plot col box<<Get As Matrix
Gets the values in a matrix, specifically a column vector.
plot col box<<Set Values([matrix] or {list})
Sets values for the matrix (for numeric variables) or list (for character variables).
Slider Boxes and Range Slider Boxes
slider box<<Get(<index>)
range slider box<<Get Lower(<index>)
range slider box<<Get Upper(<index>)
Returns the current value of the slider.
slider box<<Set(n, <index>, <run script(0|1)>)
range slider box<<Set Lower(n, <index>, <run script(0|1)>)
range slider box<<Set Upper(n, <index>, <run script(0|1)>)
Sets the value of the slider. run script(0|1) controls whether an on-change script runs after the <<Set, <<Set Lower, or <<Set Upper message.
slider box<<Get Min()
Returns the minimum value possible for the range slider and slider.
slider box<<Set Min(float, <index>)
Sets the minimum value possible for the range slider and slider.
slider box<<Get Max()
Returns the maximum value possible for the range slider and slider.
slider box<<Get Var
range slider box<<Get Lower Var
range slider box<<Get Upper Var
Returns the variable name associated with the slider.
slider box<<Set Max(float, <index>)
Sets the maximum value possible for the range slider and slider.
slider box<<Set Script(<script>)
Sets a script to be run when the range sliders and slider is updated.
slider box<<Set Var(slider_var)
range slider box<<Set Lower Var(slider_var)
range slider box<<Set Upper Var(slider_var)
Sets the variable name associated with the slider.
String Col Boxes
string col box<<Add Element(item)
Adds the item to the String Col Box. Item can be a single quoted string, a list of quoted strings, or a matrix of quoted strings.
string col box<<Get
string col box<<Get(i)
Gets the values in a list, or the i  th value.
string col box<<Get Heading
Returns the column heading text.
string col box<<Set Heading("text")
Changes the column heading text.
string col box<<Set Justify("right"|"left" |"center")
Specifies the alignment of the contents in the string col box to right, left, or center.
Tab Boxes
tab box<<Get Tab Margin()
Returns a list of the current margins in pixels for the tab box in this order: {left, top, right, bottom}.
tab box<<Set Style("tab" | "combo" | "outline" | "vertical spread" | "horizontal spread" | "minimize size")
Changes the appearance of the tab box from a tab to a combo box or outline node.
"vertical spread" and "horizontal spread" change the orientation of the tab title.
"minimize size" bases the tab style on the width of the tab title. See the Display Trees chapter in the Scripting Guide for an example.
tab box<<Set Tab Margin(n|{...})
Sets the tab margin for the tab box. If a single number is specified, all four margins are set to that number of pixels. If a list of two numbers is specified, the left and right margins are set to the first number, and the top and bottom margins are set to the second number. If a list of four numbers is specified, the margins are set in this order: {left, top, right, bottom}.
tab box<<Show Tabs(0|1)
Shows or hides the tabs for tab boxes. If you hide the tabs, you need to provide another way to select and show tabs. For example, a list box that contains a list of references to the tabs. The default value is 1.
Table Boxes
table box<<Get
Gets the entries of the table in list form.
table box<<Get As Matrix
Gets the numeric entries of the table in matrix form.
table box<<Get Locked Columns
Returns the number of columns that cannot be dragged with the hand cursor or have any columns dropped before them.
table box<<Get Row Change Function
Returns the expression that is evaluated when a row is selected.
table box<<Get Selectable Rows
Returns True if the table box currently allows row selection.
table box<<Get Selected Row Color
Returns the index number of the background color of the selected rows in the table box.
table box<<Make Combined Data Table
Same as Make Data Table, but also searches the report for report tables with the same columns and combine all of these into the new data table.
table box<<Make Data Table(name)
Turns the table entries into a new data table.
table box<<Set Row Change Function
Sets the expression that is evaluated when a row is selected.
table box<<Set Cell Changed Function(Function({this, col box, row},<script>;))
Sets a function that is called whenever the user edits a cell in a column in a table.
Example
This example prints the new values for the changed cell to the log.
New Window( "Mountains",
tb = Table Box(
String Col Edit Box(
"Mountain",
{"K2", "Delphi", "Kilimanjaro",
"Grand Teton"}
),
Number Col Edit Box(
"Elevation (meters)",
{8611, 681, 5895, 4199}
),
Plot Col Box( "", {8611, 681, 5895, 4199} )
)
);
tb <<
Set Cell Changed Function(
Function( {this, col, row},
Print(
(col << Get Heading) || ": row:" ||
Char( 3 ) || " is now " ||
Char( col << Get( row ) )
)
)
);
table box<<Set Locked Columns(n)
Locks the first n columns. You cannot drag the locked columns or drag columns before them.
table box<<Set Selectable Rows(Boolean)
Makes the rows of the Table Box selectable or not.
table box<<Set Selected Row Color("color")
If the rows of the Table Box are selectable (Set Selectable Rows(True)), sets the background color for the selected rows.
Text Boxes
text box<<Font Color(n)
Sets the color for Text strings.
text box<<Get Hidden State
Returns the current state of a text box.
text box<<Get Text
Returns the string content of the box.
text box<<Get Tip
Returns the tooltip for the text box (or a text edit box).
text box<<Markup
Returns text formatted with the specified HTML tags. The HTML must be well-formed; make sure you close nested tags correctly.
The following example returns text formatted in bold, italic, and underlined.
w = New Window( "Formatted Text",
Text Box( "This is <b>bold</b> text. This is <b><i>bold italic</i></b> text. This is <u>underlined</u> text.",
<<Markup) );
text box<<Rotate Text("direction")
Rotates the text 90 degrees "left" or "right", or returns it to the horizontal.
text box<<Set Font("name", <size>, <style | "style style...">, <angle>)
Sets the font name and properties for text strings. To specify more than one style, include a space between each style and place them in quotes.
text box<<Set Font Size(n)
Sets the font size in points for text strings.
text box<<Set Font Style("style" | "style style...")
Sets the font style for text strings. To specify more than one style, include a space between each style and place them in quotes. Integers are backwards compatible but not recommended for new scripts.
text box<<Set Script(script)
Associate a script to a text box. The script executes when the user hits enter (or the text edit box otherwise loses focus).
text box<<Set Text("string")
Changes the string content of the box.
text box<<Set Tip("string")
Sets the tooltip for the text box (or a text edit box).
text box<<Set Wrap(n)
Set the wrap point, in pixels, in pixels (n).
Tree Node and Tree Box
For the following messages, node stands for a tree node or a reference to one and root stands for a tree box or a reference to one.
node <<Append(<node_ref>)
Inserts a referenced tree node after this node’s children.
root <<Collapse(<node>)
Collapses the given tree node.
root <<Expand(<node>)
Expands the given tree node.
root <<Get Selected(<node>)
Gets the currently selected tree node.
In a single-item tree, the currently selected tree node or Empty is returned.
Table 3.1 shows the results for a Tree Box() that contains the MultiSelect argument.
 
Table 3.1 Multi-Select Tree Results 
Items Selected in Tree
Result
no items selected
empty
single item selected
list of one tree node
multiple items selected
list of selected tree nodes
node <<Get Tip
Returns the tooltip for the node.
root <<Is Multiselect
Returns 1 for a MultiSelect tree and 0 for a single-select tree.
node <<Prepend(<node_ref>)
Inserts a tree node before this node’s children.
node <<Remove(<node>)
Removes the given tree node and all its children from the tree display box.
root <<Set Selected(node|{nodes}, <0|1>)
Selects the given tree node in the tree display box. In list of tree nodes, all nodes in the list are selected for MultiSelect trees. Otherwise, the first node in the list is selected. Specify the Boolean argument to indicate whether the node or nodes should be selected or unselected. The default value is 1, which selects the nodes.
Notes: 
On Windows, the <<Set Selected() message expands all nodes between the selected node or nodes and the root of the tree; items that are selected deep within the tree are shown. The expansion state does not change for nodes that were previously selected.
On Macintosh, <<Set Selected() does not change the tree expansion state.
node <<Set Tip("text")
Specifies a tooltip for the node.
Triangulation
For the following messages, tri stands for a triangulation or a reference to one.
tri <<Get N Points
Returns the number of unique points in the triangulation.
tri <<Get Points
Returns the coordinates of the unique points in the triangulation.
tri <<Get Y
Returns the Y values of the unique points in the triangulation.
tri <<Get N Hull Points
Returns the number of points on the boundary of the triangulation.
tri <<Get Hull Points
Returns the indices of the points on the boundary of the triangulation.
tri <<Get N Hull Edges
Returns the number of edges on the boundary of the triangulation.
tri <<Get Hull Edges
Returns the indices of the edges on the boundary of the triangulation.
tri <<Get Hull Path
Returns the boundary of the triangulation as a path.
tri <<Get N Triangles
Returns the number of triangles.
tri <<Get Triangles
Returns the indices of the triangles in the form of an Nx3 matrix.
tri <<Get N Edges
Returns the number of edges in the triangulation.
tri <<Get Edges
Returns the indices of the edges in the form of an Nx2 matrix.
tri <<Subset({indices})
Returns a triangulation resulting from the given subset of points.
tri <<Peel
Peel the boundary layer of a triangulation, returning a new triangulation.
Windows
window<<Bring Window to Front
Brings the window to the front.
window<<Close Window(<nosave>)
Closes the window. If the optional argument nosave is specified, the window (journal, report, and so forth) is closed without saving or prompting.
window<<Get Content Size
Returns the size of the window’s contents.
window<<Get Window Icon
Returns the name of the window’s icon.
window<<Get Window Position
Returns the position of the window.
window<<Get Window Size
Returns the size of the window.
window<<Get Window Title
Returns the title of the window.
window<<Inval
Invalidate the display box. The window updates either when the <<Update Window message is sent or when the operating system has time for the update. See <<Reshow for another method.
window<<Maximize Display
Maximizes the window.
window<<Maximize Window(Boolean)
Maximizes the window.
window<<Minimize Window(Boolean)
Minimizes the window.
window<<Move Window(x, y)
Moves the window to the specified position.
window<<On Close(script)
Runs the script when the window is closed.
window<<Pad Window(Boolean)
Turns padding around a window’s contents on (1) or off (0). The default value is off.
window<<Print Window
Prints the window to the default printer. Note that the Print window is not opened and user input is not required.
window<<Reshow
Invalidates the display box and updates the window with the new content. See <<Inval and <<Update Window messages if more control over timing of the update is required.
window<<Set Main Window
Sets the specified window as the default window that appears when JMP is run.
window<<Set Window Icon("icon name")
Sets the window’s icon as specified.
window<<Set Window Size(x, y)
Resizes the window.
window<<Show Window(0|1)
1 shows the window (only if the window is not currently open). 0 hides the window. If the window is also minimized (on Windows) or docked (on Macintosh), showing the window restores it to the normal state and brings it to the front.
window<<Size Window(x, y)
Resizes the window.
window<<Update Window
Updates or refreshes the window holding the display box if there are invalidated regions. See also <<Inval and <<Reshow messages for additional methods.
window<<Window Class Name
Returns the name of the window class for the display box. Valid responses include: DataTable, FormulaEditor, Starter, Journal, Layout, Launcher, Report, Dialog, DialogWithMenu, ModalDialog, FindReplace, User, Generic, ToolWindow, FindReplace, AppBuilder, and Debugger.
window<<Zoom Window
Resizes the window to be large enough to show all of its contents.
Dynamic Link Libraries (DLLs)
dll object<<Call DLL(function_name, signature, arguments)
Calls the specified function in the DLL with the specified signature and arguments.
dll object<<Declare Function("name", <named_arguments>)
Declares the return type and argument types for the specified function so that it can be successfully invoked. You can use one of the named arguments for Convention: STDCALL or PASCAL, or CDECL. The type argument for Returns takes the same named arguments as Arg.
Named Arguments
Alias("name")
A name you can include if you don't like the name encoded in the DLL.
Arg(type, <"description">, <access_mode>, <array>)
Arg is optional and can appear multiple times, once for each argument to be sent to the function.
Type is one of these keywords that specifies the argument type: Int8, UInt8, Int16, UInt16, Int32, UInt32, Int64, UInt64, Float, Double, AnsiString, UnicodeString, Struct, IntPtr, UIntPtr, or ObjPtr.
"description" is an optional string that describes the argument for reference.
access_mode is an optional keyword that specifies how the argument is passed. input specifies that the argument is passed by value. output specifies that the argument is passed by address with the initial value undefined. update specifies that the argument is passed by reference and the value of the JSL variable is set as the initial value. The default value is input.
array is an optional keyword. It is valid only if the Type is specified as Double and the access_mode is specified as either input or update. Specifies that the exported function expects an array of doubles.
Convention(calling_convention)
An optional keyword that specifies the calling convention: STDCALL or PASCAL, or CDECL. The default value is STDCALL. STDCALL and PASCAL are equivalent.
MaxArgs(n)
An optional integer that specifies the maximum number of arguments that can be supplied.
MinArgs(n)
An optional integer that specifies the minimum number of arguments that can be supplied.
Returns(type)
Optional. Specifies the data type that the function returns: Int8, UInt8, Int16, UInt16, Int32, UInt32, Int64, UInt64, Float, Double, AnsiString, UnicodeString, Struct, IntPtr, UIntPtr, or ObjPtr.
StackOrder(order)
Optional keyword that specifies the order in which arguments are to be placed on the stack when calling the function. Valid values are L2R (left-to-right) and R2L (right-to-left). The default value is R2L.
StackPop(pop)
Optional keyword that specifies how the exported function expects the stack to be cleared after the function returns. Valid values are CALLER and CALLEE. The default value is CALLEE.
StructArg(Arg(...), <Arg(...)>, ..., <access_mode>, <pack_mode>, <"description">)
Optional and can appear multiple times. If an exported DLL function requires that a structure argument be passed in as an argument, use StructArg to declare the structure members. The Arg arguments use the same syntax as for Arg arguments to DeclareFunction (one for each structure member), an access_mode indicator and a pack_mode indicator.
access_mode is an optional keyword that indicates whether the struct argument should be passed by value (input) or by reference (update).
pack_mode is an optional integer that determines how the structure is packed. Valid values are 1, 2, 4, 8, and 16. The default value is 8.
description is an optional, quoted string that contains a description of the structure for reference.
dll object<<Get Declaration JSL
Sends the declaration JSL from the DLL object to log.
dll object<<Load DLL("path" <,AutoDeclare(Boolean | Quiet | Verbose)>)
dll object<<Load DLL("path" <, Quiet | Verbose>)
Loads the DLL from the specified path.
path
A quoted pathname that specifies where to load the DLL.
AutoDeclare(Boolean | Quiet | Verbose)
Optional argument. AutoDeclare(1) and AutoDeclare(Verbose) write verbose messages to the log. AutoDeclare(Quiet) turns off log window messages. If you omit this option, verbose messages are written to the log.
Quiet | Verbose
Optional argument. When you use Declare Function(), this option turns off log window messaging (Quiet) or turns on log window messaging (Verbose).
dll object<<Show Functions
Sends the declared functions for the DLL object to the log.
dll object<<Unload DLL
Unloads the DLL.
Images
The Scripting Index provides examples for processing images. In JMP, select Help > Scripting Index to view this interactive resource.
Additional resources are available from the JMP File Exchange at https://community.jmp.com/community/file-exchange.
img<<Crop(Left(pix), Right(pix), Top(pix), Bottom(pix))
Creates a new image from an existing image to the specified dimensions (in pixels).
img<<Filter("name", <n>)
Filters the image based on the specified algorithm. Filtering is useful for cleaning up noise in the image.
Note: All of the JMP image filters are supported at the operating system level. Images that are processed on Windows might differ from images processed on Macintosh.
Argument
name
A quoted string contains the name of a JMP image filter. The following filters are available:
"despeckle" removes defects (that is, speckles) from a scanned or captured image (for example, scratches, dust, etc.).
"edge" identifies pixels in an image where the brightness changes sharply and darkens pixels with no sharp change. Edge detection is used to detect changes in surface, depth, material, and lighting.
"enhance" reduces the contrast between pixels in a noisy image.
"median" reduces noise (that is, the random variation) and smooths an image by comparing each pixel’s brightness with its neighbors’ and, if the value is very different, replaces it with the average of the neighbors’ values.
"negate" creates the negative of the color or gray-scale image by changing each pixel color to its complementary color.
"normalize" changes a color image’s pixels to use the full range of the file format’s number system. Normalization will make the image’s colors more intense.
"sharpen" reduces blur by sharpening edges of an image.
"contrast", n brightens or darkens an image. A higher number (>0.0) brightens an image; a lower number (<0.0) darkens an image.
"gamma", n corrects the image visual display (brightness and intensity) to account for differences in monitor hardware. A higher number (> 1.0) lightens the image; a lower number (< 1.0) darkens the image.
"reduce noise", n reduces the random variation (or noise) that occurs with higher ISO sensitivity or longer exposure times.
"gaussian blur", radius, sigma reduces image noise and detail creating a smoother image. Radius is equal to the blur radius around each pixel and sigma is the standard deviation of the Gaussian distribution. Gaussian blur is commonly used when resizing or performing edge detection.
img<<Flip Both
Flips the image from left to right and top to bottom.
img<<Flip Horizontal
Flips the image from left to right.
img<<Flip Vertical
Flips the image from top to bottom.
img<<Get N Frames
Returns the number of frames in a multi-frame TIFF or animated GIF file, where the number of frames begins with frame 0.
Example
The following example places a four-frame TIFF file in a new window and shows the image that is in the first frame.
img = New Image( "$DOWNLOADS/Multiframe.tif" );
nframes = img << Get N Frames(); // return 4
img << Set Current Frame( 1 ) // show image 1
win = New Window( "Multi-Frame TIFF", img );
img<<Get Size
img<<Size
Returns a list containing the width and height (in pixels) of the image.
img<<Rotate(degrees)
Rotates the image by the specified number of degrees.
img<<Save Image("filepath")
Saves the image to the specified path and filename (filepath).
img<<Scale(n, <n>)
Resizes the image by the specified dimensions. Provide one argument to resize both the width and height. Provide two arguments to resize the width and height separately.
Examples
img = New Image( "$SAMPLE_IMAGES/tile.jpg" );
xs = 2;
img << Scale( xs );
New Window( "Tilex 2", img );
 
img = New Image( "$SAMPLE_IMAGES/tile.jpg" );
img << Scale( 2, 0.5 ); // scale image width by 2 and height by 1/2
New Window( "Tile squished", img );
Notes
Using Scale is an alternative to getting the size of the image, multiplying by the scale factor, and then setting the size.
img<<Set Current Frame
Sets the frame that shows in a multi-frame TIFF or animated GIF file. Specify 0 through the number of frames minus 1. For example, with four frames, you can specify frame 0 through frame 3. See “img<<Get N Frames” for an example.
img<<Set Size(width, height)
Resizes the image to the specified dimensions (in pixels). To scale the image proportionally, specify a width and height that correspond to the aspect ratio in the original image.
img<<Transparency(fraction)
Sets the transparency for the image where the fraction is between 0.0 (full transparency) to 1.0 (no transparency).
MATLAB
The MATLAB interfaces are scriptable using a MATLAB connection object. Use the MATLAB Connect() JSL function to obtain a scriptable MATLAB connection object. See the Extending JMP chapter in the Scripting Guide for details.
mlconn << Control( <named arguments> )
Controls the execution of MATLAB.
Returns
None.
Named Arguments
Echo(Boolean)
Global. Echo MATLAB source lines to the JMP Log window.
Visible(Boolean)
Global. Determine whether to show or hide the active MATLAB workspace.
mlconn << Disconnect()
Description
Disconnects this MATLAB integration interface connection.
mlconn << Execute( { list of inputs }, { list of outputs }, mCode, <named arguments> )
Submits MATLAB code to the active global MATLAB integration interface connection given a list of inputs and upon completion a list of outputs are retrieved.
Returns
0 if successful, otherwise nonzero.
Arguments
{ list of inputs }
Positional, name list. List of JMP variable names to be sent to MATLAB as inputs.
{ list of outputs }
Positional, name list. List of JMP variable names to be retrieved from MATLAB as outputs.
mCode
Positional, string. The MATLAB code to submit.
Named Arguments
Expand(Boolean)
Perform an Eval Insert on the MATLAB code prior to submission.
Echo(Boolean)
Echo MATLAB source lines to the JMP Log window. Default is true.
mlconn << Get Graphics( format )
Gets the last graphic object written to the MATLAB graph display window. The graphic object can be returned in several graphic formats.
Returns
JMP Picture object.
Arguments
format
Positional. The format the MATLAB graph display window contents are to be converted to. Valid formats are "png", "bmp", "jpeg", "jpg", "tiff", and "tif".
mlconn << Get Version()
Gets the current version of the installed MATLAB.
Returns
Matrix, returns a vector of length 3 containing the MATLAB version number.
Arguments
None.
mlconn << Get( name )
Description
Gets a named variable from MATLAB to JMP.
Returns
Value of named variable.
Arguments
name
Positional. The name of a JMP variable to be retrieved from MATLAB.
mlconn << Is Connected()
Description
Determines whether connection is active.
Returns
1 if connected, otherwise 0.
Arguments
None.
mlconn << JMP Name To MATLAB Name( JMP name)
Maps a JMP variable name to its corresponding MATLAB variable name using MATLAB variable name naming rules.
Returns
String, a mapped MATLAB name.
Arguments
names
Positional. The name of a JMP variable to be sent to MATLAB.
mlconn << Send( name, <named arguments> )
Description
Sends the named variable from JMP to MATLAB.
Returns
0 if successful, otherwise nonzero.
Arguments
name
Positional. The name of a JMP variable to be sent to MATLAB.
Named Arguments
The following arguments are for data tables only:
Selected(Boolean)
Send selected rows from the referenced data table to MATLAB.
Excluded(Boolean)
Send only excluded rows from the referenced data table to MATLAB.
Labeled(Boolean)
Send only labeled rows from the referenced data table to MATLAB.
Hidden(Boolean)
Send only hidden rows from the referenced data table to MATLAB.
Colored(Boolean)
Send only colored rows from the referenced data table to MATLAB.
Markered(Boolean)
Send only markered rows from the referenced data table to MATLAB.
Row States (Boolean, <named arguments>)
Send row states from referenced data table to MATLAB by adding an additional data column named “RowState”. Create multiple selections by adding together individual settings. The row state consists of individual settings with the following values:
Selected = 1
Excluded = 2
Labeled = 4
Hidden = 8
Colored = 16
Markered = 32
The following optional, named Row States arguments are supported:
Colors(Boolean)
Send row colors. Adds additional data column named “RowStateColor”.
Markers(Boolean)
Send row markers. Adds additional data column named “RowStateMarker”.
mlconn << Submit( mCode, <named arguments> )
Submits MATLAB code to the active global MATLAB integration interface connection.
Returns
0 if successful, otherwise nonzero.
Arguments
mCode
Positional, string. The MATLAB code to submit.
Named Arguments
Expand(Boolean)
Perform an Eval Insert on the MATLAB code prior to submission.
Echo(Boolean)
Echo MATLAB source lines to the JMP log. Default is true.
mlconn << Submit File( pathname )
Submits statements to MATLAB using a file pointed to by pathname.
Returns
0 if successful, otherwise nonzero.
Arguments
Pathname
Positional, string. Pathname to file containing MATLAB source lines to be executed.
Platforms
obj<<Action
Evaluates expressions. Useful for stringing together multiple platforms interrupted by user input.
obj<<Automatic Recalc
Redoes the analysis automatically for exclude and data changes. If automatic recalc is on, you should use wait(0) commands to let the triggers take effect and do the recalculation.
Not supported on all platforms.
obj<<Bring Window To Front
Brings the current window to the front.
obj<<Close Window
Closes window identified by obj, typically a platform surface.
obj<<Column Switcher (default column, {col 1, col 2, ...})
Adds a control panel to a platform for switching variables.
obj<<Copy ByGroup Script
Create a script to produce this analysis containing By variables and place it on the clipboard.
obj<<Copy Script
Create a script to produce this analysis and place it on the clipboard.
obj<<Data Table Window
Makes the associated data table window active (front-most).
obj<<Get Data Table
Returns a reference to the data table.
obj<<Get Script
Returns script to reproduce the analysis as an expression.
obj<<Get Script With Data Table
Creates a script to reproduce the analysis, specifically referencing the source data table, and returns it as an expression.
obj<<Get Timing
Times the launch of the platform.
obj<<Get Web Support
Returns the score for the display tree that is about to be saved as interactive HTML. Possible values are -1 (unsupported), 0 (supported), and 1 (supported). If the score does not equal -1, interactive HTML is supported and <<Save Interactive HTML() can be used.
obj<<Get Window Position
Gets the position of the window. Returns an ordered pair.
obj<<Get Window Size
Gets the window size, in pixels. Returns an ordered pair.
obj<<Ignore Platform Preferences
Ignores the current settings of the platform’s preferences.
obj<<Journal Window
Appends the contents of the window to the journal.
obj<<Local Data Filter
Filters data to specific groups or ranges, but stays local to the platform.
obj<<Maximize Window
Maximizes the window. Equivalent to pushing the maximize button in the corner of the window. This message takes an optional Boolean argument:
// maximize the window:
obj<<Maximize Window(1)
// restore the window:
obj<<Maximize Window(0)
obj<<Minimize Window
Minimizes the window. Equivalent to pushing the minimize button in the corner of the window. This message takes an optional Boolean argument:
// minimize the window:
obj<<Minimize Window(1)
// restore the window:
obj<<Minimize Window(0)
obj<<Move Window(x, y)
Moves the window to the (x,y) location on your screen.
obj<<Print Window
Sends the selected window to the printer.
obj<<Redo Analysis
Launches the platform again with the same options.
obj<<Redo ByGroup Analysis
Rerun this same analysis involving By groups in a new window.
obj<<Relaunch Analysis
Return to the launch window for this analysis involving By groups.
obj<<Relaunch ByGroup
Return to the launch window for this analysis.
obj<<Remove Column Switcher
Removes all Column Switchers that were added to the platform.
obj<<Remove Local Data Filter
Removes all Local Data Filters that were added to the platform.
obj<<Report
Report(obj)
Returns a display box reference for the report in the platform window. For details, see the Display Trees chapter in the Scripting Guide.
obj<<Report View
Determines the level of detail visible in a platform report. Full shows all detail and Summary shows only select content, dependent upon the specific platform. For customized behavior, use the Set Summary Behavior message with display boxes.
obj<<Save ByGroup Script to Data Table
Creates a script to produce the analysis involving By variables and saves it as a table property in the data table.
obj<<Save ByGroup Script to Journal
Creates a script to produce the analysis involving By variables and adds a button to the journal containing this script.
obj<<Save ByGroup Script to Script Window
Creates a script to produce the analysis involving By variables and appends it to the current Script window.
obj<<Save Script for All Objects
Saves script to reproduce all analyses found within the object’s window in the Script Journal window.
obj<<Save Script to Data Table
Saves script to reproduce analysis as a property in the associated data table.
obj<<Save Script to Journal
Creates a script to produce the analysis and adds a button to the journal containing this script.
obj<<Save Script to Report
Saves script to reproduce analysis as a text box at the top of the report.
obj<<Save Script for All Objects to Data Table
Saves a script for all report objects to the current data table. The script is named after the platform unless you specify the script name in quotes.
obj << Save Script for All Objects To Data Table("My Script")
obj<<Save Script to Script Window
Saves a script to reproduce analysis in the Script Journal.
obj<<Scroll Window(x, y)
obj<<Scroll Window({x, y})
Scrolls the window x pixels to the left and y pixels down from the current position. Negative coordinates go right and up. If the coordinates are a list in braces { }, they are absolute coordinates. The window scrolls to the point x pixels from the left and y pixels from the top.
obj<<SendToReport
Used with the Dispatch function to customize the appearance of a report.
obj<<SendToByGroup
Sends messages to open platforms or turn on platform features to each level of a by-group.
obj<<Show Window(0|1)
1 shows the window (brings it to the front). 0 hides the window. If the window is also minimized (on Windows) or docked (on Macintosh), showing the window restores it to the normal state and brings it to the front.
obj<<Size Window(x, y)
Resizes the window to x pixels wide by y pixels high.
obj<<Title
Returns the title of the platform.
obj<<Top Report
Returns a reference to the top display box in the report. Useful for BY groups or other cases when several platform reports are in one window.
obj<<View Web XML
Returns the XML used to create the interactive HTML report.
obj<<Zoom Window
Resizes the window to be large enough to show all of its contents.
Response Screening
obj<<Get PValues
Returns a reference to a PValues table.
obj<<Save PValues
Stores the p-values in an output data table.
obj<<Save Compare Means
Stores the means comparisons in an output data table.
obj<<Save Mean
Stores the means in an output data table.
obj<<Save Outlier Indicator
Saves Outlier Indicator for each fit.
obj<<Save Std Residuals
Saves the residual formula for each fit.
obj<<Select Columns
Select columns in the original table corresponding to selected rows in this table.
Tabulate
obj<<Display Column Width(<Data Column(Column Table(n),"colname_path"), Row Label(Row Table(n), "colname_path")>, <width>)
Returns or sets the display pixel width of a column in a Tabulate table.
Argument
data column
Use Column Table and column references to define columns in the main body of the table.
row label
Use Row Table and heading for columns in the row labels area.
colname_path
An optional Column Table or Row Table, and the series of column headings that traces the path of the column. Note: Column table or row table can be omitted if the table referenced is the first table.
width
The pixel width of the column.
Examples
dt = Open( "$SAMPLE_DATA/Car Poll.jmp" );
obj = dt << Tabulate(
Add Table(
Column Table(
Grouping Columns( :sex, :marital status ),
Analysis Columns( :age ),
Statistics( Sum, "% of Total" )
),
Row Table( Grouping Columns( :type ) ),
Row Table( Grouping Columns( :country, :size ) )
)
);
Wait( 3 ); // for demonstration purposes
obj << Display Column Width( Row Label( Row Table( 2 ), "country" ), 150 );
Wait( 3 ); // for demonstration purposes
obj << Display Column Width(
Data Column(
Column Table( 1 ),
"sex",
"Female",
"marital status",
"Married",
"age",
"Sum"
),
150
);
R Integration Messages
The R interfaces are also scriptable using an R connection object. A scriptable R connection object can be obtained using the R Connect() JSL function.
rconn<<Control( Interrupt (1) )
If Async is set to true (1) for R Submit(), this message immediately stops the execution of the R code that was submitted.
rconn<<Disconnect()
Disconnects this R connection.
rconn<<Is Connected()
Returns 1if the R connection is active, 0 otherwise.
rconn<<Send("name", named_arguments)
Send the specified JMP variable to R.
Returns
0 if successful, nonzero otherwise.
Argument
name
A quoted string contains the name of a JMP variable to send to R.
Arguments for Data Tables
Selected(0|1)
Optional, Boolean. If true, sends only the selected rows from the referenced data table to R.
Excluded(0|1)
Optional, Boolean. If true, sends only the excluded rows from the referenced data table to R.
Labeled(0|1)
Optional, Boolean. If true, sends only labeled rows from the referenced data table to R.
Hidden(0|1)
Optional, Boolean. If true, sends only hidden rows from the referenced data table to R.
Colored(0|1)
Optional, Boolean. If true, sends only colored rows from the referenced data table to R.
Markered(0|1)
Optional, Boolean. If true, sends only markered rows from the referenced data table to R.
Row States(0|1, <named arguments>)
Optional. Includes a Boolean argument and optional named arguments. Sends row state information from the referenced data table to R by adding an additional data column named “RowState”. The row state value consists of individual settings with the values shown in Table 3.2.
 
Table 3.2 Row States 
Multiple row states are created by adding together individual settings.
Selected = 1
Excluded = 2
Labeled = 4
Hidden = 8
Colored = 16
Markered = 32
Arguments
Colors(Boolean)
Optional, Boolean. If true, sends row colors and adds an additional data column named “RowStateColor”.
Markers(Boolean)
Optional, Boolean. If true, sends row markers and adds an additional data column named “RowStateMarker”.
rconn<<Send("name")
Send the specified JMP data file to R.
rconn<<Get("name")
Gets the specified variable from R.
Returns
The value of the specified variable.
Arguments
name
A quoted string that contains the name of a JMP variable to be retrieved from R.
rconn<<Get Graphics("type")
Gets the last graphics object written to the R graph display window. The graphics object can be returned in different graphic formats.
Returns
A JMP picture object.
Arguments
type
The format the R graph display window contents are to be converted to. Valid formats are "png", "bmp", "jpeg", "jpg", "tiff", and "tif".
rconn<<Submit("code", named_arguments)
Submits the R code.
Returns
0 if successful, nonzero otherwise.
Arguments
code
A quoted string that contains the R code to submit.
Expand(0|1)
Optional, Boolean. Performs an Eval Insert() on the R code before submitting the code.
Echo(0|1)
Optional, Boolean. Echoes the R source lines to the JMP log. The default value is true.
Rconn<<Submit File("filepath")
Submits statements to R using the file in the "filepath".
Arguments
filepath
A quoted string that contains the pathname to the file that contains R code to be executed.
rconn<<Execute({ list of inputs }, { list of outputs }, "code", named_arguments)
Submits the R code to the R connection using the list of inputs. Upon completion, a list of outputs is returned.
Returns
0 if successful, nonzero otherwise.
Arguments
{ list of inputs }
List of JMP variable names to be sent to R as inputs.
{ list of outputs }
List of JMP variable names to be retrieved from R as outputs.
code
A quoted string that contains the R code to submit.
named_arguments
rconn<<Control(named_arguments)
Controls the execution of R.
Returns
Void.
Argument
Echo(Boolean)
Optional, Boolean. Echoes the R source lines to the JMP log.
rconn<<Get Version()
Gets the current version of R that is installed.
Returns
A vector of length 3 containing the R version number.
rconn<<JMP Name To R Name("name")
Maps a JMP Name to its corresponding R Name using R variable name naming rules.
Returns
A string that contains the R name.
Arguments
name
A quoted string that contains the name of a JMP variable to be sent to R.
SAS Integration Messages
Metadata Server Objects
metaserver<<Disconnect()
Function
Disconnects the metadata server.
Returns
Void.
metaserver<<Get Display Name()
Function
Gets the display name of the metadata server.
Returns
A string.
metaserver<<Get Host Name()
Function
Gets the host (machine) name of the metadata server.
Returns
A string.
metaserver<<Get Port()
Function
Gets the port used for the metadata server connection.
Returns
An integer.
metaserver<<Get User Identity()
Function
Gets the identify of the connected user as defined in metadata.
Returns
A string.
metaserver<<Get User Name()
Function
Gets the user name (login ID) that was used for the metadata server connection.
Returns
A string.
SAS Server Objects
sasconn<<Assign Libref("libref", "path", engine, engine options)
Function
Assign a SAS libref on this SAS server connection.
Returns
Void.
Arguments
sasconn<<Cancel Submit()
Function
Cancels the currently running SAS Submit for this server that is presumably running asynchronously.
Returns
1 if a running submit was found and canceled; 0 otherwise.
sasconn<<Clear Log History()
Function
Clears the SAS Log history for this server.
Returns
Void.
sasconn<<Clear Output History()
Function
Clears the SAS Output history for this server.
Returns
Nothing
sasconn<<Connect(<named arguments>)
Function
Attempt to reconnect a SAS server connection object that has become disconnected.
Returns
1 if the connection was successful, 0 otherwise.
Named Arguments
All named arguments are optional.
UserName("name")
A quoted string that contains the user name for the connection.
Password("password")
A quoted string that contains the password for the connection.
Prompt(Always|Never|IfNeeded)
A keyword. Always means always prompt before attempt to connect. Never means never prompt even if the connection attempt fails (just fail with an error message going to the log), and IfNeeded (the default) means prompt if the attempt to connect with the given arguments fails (or is not possible with the information given).
sasconn<<Deassign Libref("libref")
Function
De-assign a SAS libref on this SAS server connection.
Returns
Void.
Arguments
libref
Quoted string that contains the library reference.
sasconn<<Disconnect()
Function
Disconnect this SAS server connection.
Returns
Void.
sasconn<Does Module Exist("moduleName")
Function
Determines whether the specified SAS module exists in the SAS installation represented by the SAS connection. This can be helpful in determining whether certain SAS products are installed. The SAS DATA Step function MODEXIST is used to determine module existence. Because MODEXIST is new for SAS 9.2, this function throws an exception if it is called for a SAS connection that is not version SAS 9.2 or later.
Returns
1 if the specified module is found to exist, 0 if it does not exist.
Argument
moduleName
The quoted SAS module, the existence of which should be checked. Do not include any extension.
sasconn<<Export Data(dt, "library", "dataset", <named arguments>)
Function
Exports a JMP data table to the specified SAS data set in the specified library on the active SAS server connection.
Returns
1 if the data table was exported successfully; 0 otherwise.
Arguments
sasconn<<Get Data Sets("libref")
Function
Returns a list of the data sets defined in a SAS library on this SAS server connection.
Returns
List of strings.
Arguments
libref
Quoted string that contains the SAS libref or friendly library name associated with the library for which the list of defined SAS data sets will be returned.
sasconn<<Get Error Count()
Function
Gets the count of the number of errors encountered in the previous SAS Submit.
Returns
An integer.
sasconn<<Get File("source", "dest")
Function
Download a file from this SAS server connection.
Returns
Void.
Arguments
sasconn<<Get File Names("fileref")
Function
Get a list of filenames found in the given "fileref" on this SAS server connection.
Returns
List of strings.
Arguments
fileref
Quoted string that contains the name of fileref from which to retrieve filenames.
sasconn<<Get File Names In Path("path")
Function
Get a list of filenames found in the given "path" on this SAS server connection.
Returns
List of strings.
Arguments
path
Quoted string that contains the directory path on the server from which to retrieve filenames.
sasconn<<Get File Refs()
Function
Get a list of the currently defined SAS filerefs on this SAS server connection.
Returns
List of strings.
sasconn<<Get Librefs(<named arguments>)
Function
Get a list of the currently defined SAS librefs on this SAS server connection.
Returns
List of strings.
Arguments
sasconn<<Get Log()
Function
Retrieve the SAS Log from the last SAS Submit from this SAS server connection.
Returns
String.
sasconn<<Get Option Name()
Function
Query SAS for the value of a SAS option variable.
Returns
String.
Example
The following script iterates through the define variables and prints out the values:
option_names = sasconn << Get Option Names();
For(i=1, i <= N Items(option_names), i++,
option_value = sasconn << Get Option Value (option_names[i]);
output = option_names[i] || "=" || char(option_value) || "/!n";
Write(output);
);
sasconn<<Get Output()
Function
Retrieve the listing output from the last submission of SAS code to this SASServer object.
Returns
String.
sasconn<<Get Results()
Function
Retrieve the results of the previous SAS Submit as a scriptable object, which allows significant flexibility in what to do with the results.
Returns
A SAS Results Scriptable Object.
sasconn<<Get Submit Status()
Function
Gets the current status of a SAS Submit for this server that is presumably running asynchronously.
Returns
1 if the submit has not started; 2 if the submit is running; 3 if the submit has been canceled; 10 if the submit has completed successfully; 11 if the submit has completed with errors.
sasconn<<Get Var Info("libref", "dataset", <"password">)
Function
Returns information about the variables the specified SAS data set.
Arguments
libref
Quoted string that contains the library reference to de-assign.
dataset
Quoted string that contains the name of the data set from which to retrieve variable names.
Password("password")
A quoted string that contains the password for the connection.
sasconn<<Get Var Names("libref", "dataset", <named arguments>)
Function
Retrieves the variable names contained in the specified data set on this SAS server connection.
Returns
List of strings.
Arguments
sasconn<<Get Version(<"long">)
Function
Returns the SAS version as a string such as “9.1” or “9.2”.
Returns
A string that contains the SAS version.
Argument
long
An optional quoted keyword that specifies to return the long SAS version, which corresponds to the SYSVLONG SAS macro. For example, "9.02.02M0P01152009".
sasconn<<Get Work Folder()
Function
Returns the full path of the folder corresponding to the WORK library for this server.
Returns
A string that contains the work folder path.
sasconn<<Import Data("library", "dataset", <named arguments>)
Function
Import a SAS data set from this SAS server connection into a JMP table.
Returns
JMP Data Table object.
Arguments
sasconn<<Import Query("sqlquery", <named arguments>)
Function
Execute the requested SQL query on this SAS server connection, importing the results into a JMP data table.
Returns
JMP data table object.
Arguments
sasconn<<Is Connected()
Function
Determine whether this SAS Server object is currently connected to SAS.
Returns
1 if sasconn is connect, 0 otherwise.
sasconn<<Is Product Available("productName")
Function
Determine whether the quoted SAS product is both licensed and installed in the session represented by the SAS connection. The SAS DATA Step functions SYSPROD and MODEXIST are used to determine the licensed and installed status of the product.
Returns
1 if the specified product is licensed, 0 if the product is not licensed, or -1 if the specified product is not recognized by SAS. This function throws an exception if the requested product is not one for which JMP knows how to check the installed status.
Argument
productName
The quoted SAS product for which licensing should be checked. The product name can be specified with or without the “SAS/” prefix.
Note
The MODEXIST function is new in SAS 9.2. For SAS 9.1.3, this function only checks the license, not the installed status. In other words, for SAS 9.1.3, this function operates the same way as Is Product Licensed().
sasconn<<Is Product Licensed("productName")
Function
Determines whether the quoted SAS product is licensed in the session represented by the SAS connection. The SAS DATA Step function SYSPROD is used to determine the licensing status of the product.
Returns
1 if the specified product is licensed, 0 if the product is not licensed, or -1 if the specified product is not recognized by SAS.
Argument
productName
The quoted SAS product for which licensing should be checked. The product name can be specified with or without the “SAS/” prefix.
sasconn<<Kill Session(<n>)
Function
Immediately terminates the SAS connection.
Returns
Void.
Arguments
n
An optional number. The system waits n seconds for a normal shut-down before immediately terminating the SAS connection.
sasconn<<Load Text File("path", <named arguments>)
Function
Download the file specified in "path" from the active SAS server connection and retrieve its contents as a string.
Returns
String.
Arguments
sasconn<<Open Log Window()
Function
Opens (or brings to the front) the SAS Log window for this server.
Returns
Void.
sasconn<<Open Output Window()
Function
Opens (or brings to the front) the SAS Output window for this server.
Returns
Void.
sasconn<<Open SAS Results()
Function
Open the results from the previous SAS Submit. Intended to be used with asynchronous SAS submits or the use of the OnSubmitComplete option to SAS Submit to give the JSL author a way to conditionally open the results of a submit.
Returns
Void.
sasconn<<Open Submit Results()
Function
Opens all the results from the last SAS Submit command.
Returns
Void.
sasconn<<Send File("source", "dest")
Function
Upload a file to this SAS server connection.
Returns
Void.
Arguments
sasconn<<Submit(sasCode, <named arguments>)
Function
Submit some SAS code to this SAS server connection.
Returns
Void.
Arguments
sasconn<<Submit File("filename", <named arguments>)
Function
Submit a SAS code file to this SAS server connection.
Returns
Void.
Arguments
Stored Processes
stp<<Begin Run(<named arguments>)
Function
Start this stored process executing in the background. This message is paired with End Run, which should also be called at some point after Begin Run to wait for the stored process to complete.
Returns
-1 = execution failed.
1 = not started.
2 = running.
3 = canceled.
10 = completed successfully.
11 = completed with errors.
Arguments
Same as Run, except AutoOpenResults and NoAlerts are not supported. They are available on EndRun.
AutoResume(<"filename">)
Optional, quoted string. If specified with no argument, it specifies that the stored process results should be auto-opened when the stored process completes. If filename is specified, filename is opened rather than all results of the stored process being auto-opened.
AutoResumeScript("script")
Optional, quoted string that specifies that after stored process execution completes, script should be evaluated. If the script is a function taking at least one argument, the function is evaluated with the scriptable stored process object passed as the first (and only) argument. AutoResume and AutoResumeScript are mutually exclusive.
stp<<Delete Results(<named arguments>)
Function
Delete all results from the execution of this stored process.
Returns
1 if deletion is successful, 0 otherwise (error message to JMP log).
Arguments
NoAlerts(0|1)
Optional, Boolean. If True, the user is not prompted for confirmation before the attempt is made to delete results.
DeleteDirectory(0|1)
Optional, Boolean. If true, deletes the directory containing the stored process results along with the result files themselves. The default value is true.
stp<<Edit Param Values()
Function
Opens the stored process window for interactively setting parameter values.
Returns
1 if the user clicks OK to dismiss the window, 0 if the user clicks Cancel.
stp<<End Run(<named arguments>)
Function
Waits a specified amount of time (or forever) for a stored process started with Begin Run to complete. If the stored process is complete, retrieves the results, and opens them.
Returns
-1 = execution failed.
1 = not started.
2 = running.
3 = canceled.
10 = completed successfully.
11 = completed with errors.
Arguments
AutoOpenResults(0|1)
Optional, Boolean. If True, results are automatically opened if the stored process completes in the time specified by MaxWait. If False, results are not automatically opened, and can be manually opened via the object returned by the Get Results message. Default is True.
MaxWait(milliseconds)
Optional, an integer. Specifies the maximum amount of time in milliseconds to wait for the stored process to complete. If MaxWait is not specified, End Run waits forever for the stored process to complete.
NoAlerts(0|1)
Optional, Boolean. If True, error messages are sent to the JMP log rather than message boxes. The default value is False.
stp<<Get Metadata Id()
Function
Returns the metadata ID of the stored process.
Returns
String.
stp<<Get Metadata Path()
Function
Returns the full metadata path of the stored process.
Returns
String.
Stp<<Get Name()
Function
Returns the name of the stored process.
Returns
String.
stp<<Get Param Enum Labels("name")
Function
Get the enumeration labels for a parameter.
Returns
List of strings.
Arguments
name
Quoted string that contains the name of the parameter whose enumeration labels to retrieve.
stp<<Get Param Enum Values("name")
Function
Get the possible enumerated values for a parameter.
Returns
List of strings.
Arguments
name
Quoted string that contains the name of the parameter whose possible enumerated values to retrieve.
stp<<Get Param Names(<named arguments>)
Function
Get a list of parameter names for this stored process of specific types.
Returns
List of strings.
Arguments
Visible(0|1)
Optional, Boolean. If True, get only visible parameters. If False, get only non-visible parameters. If not specified, get both visible and non-visible parameters.
Modifiable(0|1)
Optional, Boolean. If True, get only modifiable parameters. If False, get only non-modifiable parameters. If not specified, get both modifiable and non-modifiable parameters.
Required(0|1)
Optional, Boolean. If True, get only required parameters. If False, get only non-required parameters. If not specified, get both required and non-required parameters.
Expert(0|1)
Optional, Boolean. If True, get only expert parameters. If False, get only non-expert parameters. If not specified, get both expert and non-expert parameters.
stp<<Get Param Value("name")
Function
Get the current value of the specified parameter.
Returns
String.
Arguments
name
Quoted string that contains the name of the parameter whose value to retrieve.
stp<<Get Results()
Function
Get the results generated by the execution of this stored process as a scriptable object.
Returns
SAS Results scriptable object.
stp<<Get Status()
Function
Get the execution status of the stored process.
Returns
-1 = execution failed.
1 = not started.
2 = running.
3 = canceled.
10 = completed successfully.
11 = completed with errors.
stp<<Get Status Message()
Function
Get the message associated with the failure of the stored process, if any.
Returns
String.
stp<<Reset Param Values()
Function
Reset all parameter values to their metadata-defined default values.
Returns
Void.
stp<<Run(<named arguments>)
Function
Execute this stored process object in the foreground.
Returns
-1 = execution failed.
1 = not started.
2 = running.
3 = canceled.
10 = completed successfully.
11 = completed with errors.
Arguments
AutoOpenResults(0|1)
Optional, Boolean. If True, results are automatically opened when the stored process completes. If False, results are not auto-opened, and can be manually opened via the object returned by the GetResults message. The default value is True.
UserName("username")
Optional, quoted string that contains the user name under which to run the stored process.
Password("password")
Optional, quoted string that contains the password for Username.
AuthDomain("authDomain")
Optional, quoted string that contains the authentication domain of the credentials (username, password) given.
ODSDest("dest")
Optional, quoted string that contains an ODS destination (HTML, PDF, tagsets.SASReport12) for any ODS-generated results from the stored process. This requires the stored process SAS code to call %STPBEGIN. The default value is HTML.
GraphicsDevice("device")
Optional, quoted string that contains the SAS graphics device to use when generating graphics in ODS results. This requires the stored process SAS code to call %STPBEGIN. The default value is GIF.
ODSStyle("styleName")
Optional, quoted string that contains an ODS style to apply to the results. This requires the stored process SAS code to call %STPBEGIN. There is no default value.
ODSStyleSheet("cssFile")
Optional, quoted string that contains the full path to a CSS file on the client machine that is to be applied to generated ODS results. This requires the stored process SAS code to call %STPBEGIN. There is no default value.
NoAlerts(0|1)
Optional, Boolean. If True, error messages are sent to the JMP log rather than message boxes. The default value is False.
stp<<Set Param Value("name", "value")
Function
Sets the value of the specified stored process parameter to the specified value.
Returns
1 if successful, 0 otherwise (value can violate the parameter’s constraints).
Arguments
name
Quoted string that contains the name of the parameter whose value to set.
value
Quoted string that contains the value to which to set the parameter.
stp<<Set Results Directory("directory")
Function
Sets the directory on the client machine where stored process results are placed.
Returns
String.
Arguments
directory
Quoted string that contains the full path of the directory where results of the stored process execution should be placed. The directory must exist or be creatable. If the results directory is not set, a temporary location appropriate for the operating system will be used, and that directory can be retrieved from the stored process Results scriptable object after the stored process executes.
SAS Results
results<<Delete All Result Files()
Function
Deletes all files created by the SAS Submit or Stored Process execution. Note that any result files that are still in use are not deleted.
Returns
1 if the deletion was successful; 0 if some of the files could not be deleted.
results<<Get Directory()
Function
Gets the directory where the results generated by the stored process or SAS submit are located.
Returns
String.
results<<Get Log()
Function
Get the SAS Log from the execution of the stored process or SAS submit.
Returns
String.
results<<Get Main Result File Name(<named arguments>)
Function
Gets the full path of the main result file generated by the stored process or SAS submit.
Returns
String.
Arguments
FullPath(0|1)
Optional, Boolean. If True, the main result filename is returned as a full path. The default value is False.
results<<Get Output()
Function
Gets the SAS Listing output from the execution of the stored process or SAS submit.
Returns
String.
results<<Get Output Datasets()
Function
Get a list of output data set generated by the SAS Submit that created this SAS Results object.
Returns
A list of data set names in the form “libname.membername”.
results<<Get Result File Info(<MIMEType("mime-type")>, <FullPath>)
Function
Get information about result files that were generated by the execution of the stored process or SAS submit.
Returns
List of two lists of strings. The first list is filenames, and the second list is the MIME-type of the corresponding file from the first list.
Arguments
MIMEType("mime_type")
Optional, quoted string that restricts the set of files for which information is returned to only those files with the specified MIME-type. If not specified, information about all generated files is returned.
FullPath
Optional, Boolean. If True, the filename returned for each result file is returned as a full path; if False, only the name of the file is returned. The default value is False.
results<<Make JMP Report()
Function
Parses the ODS XML results and creates a JMP report.
Returns
The display box for the report.
results<<Open All Results()
Function
Opens all results generated by the execution of the stored process or SAS submit.
Returns
Void.
results<<Open Result File("filename", <named arguments>)
Function
Attempts to open the result file with the given name.
Returns
JMP Data Table if one was opened.
Arguments
filename
Quoted string that contains the name of the file from the generated results to open. filename should just be the name of the file, not the full path. If filename is a filename with no extension, both JMP data tables and JSL scripts in the results are searched for a match, and if both exist, both are opened.
RunScript(0|1)
Optional, Boolean. If True, and if filename is a JSL script, the script is executed. If False, filename is just opened, even if it is JSL.
results<<Run Script("filename")
Function
Looks for a JSL file in the results with the given filename and runs it if it finds it.
Returns
Void.
Arguments
filename
Quoted string that contains the name of the JSL file from the generated results to open. Filename should just be the name of the file, not the full path, and it does not need to include the .jsl extension.
For more information about scheduling actions, see the Programming chapter in the Scripting Guide.
sch<<Clear Schedule()
Cancels all scheduled events.
sch<<Close()
Closes the scheduler.
sch<<Restart()
Restarts the scheduler after it was stopped from running all scheduled events.
sch<<Show Schedule()
Shows a list of all scheduled events.
sch<<Stop()
Stops the scheduler from running all scheduled events.
Sockets
skt<<Accept(<callback, timeout>)
Function
Tells the server socket to accept a connection and return a new connected socket.
Returns
A list of up to four items. The first is a string that echoes the command ("accept"). The second is a string, either "ok" or an error. The third is a string that specifies the name of the machine that just connected. The fourth is a reference to the socket that you can send more messages.
Arguments
callback
an optional argument that specifies the name of a function to receive the data.
timeout
if you use a callback, timeout specifies how long the function should wait for an answer. For a server socket, 0 is an acceptable value because a server should not shut down because no one has connected to it recently.
skt<<bind("localhost", port)
Function
Associates a port on the local machine with the socket.
Returns
A list of two strings. The first string is the command name (“bind”) and the second is “ok” if successful or an error.
Argument
localhost
Specifies the local machine. You cannot bind to another machine.
port
The port that should be used.
skt<<Close()
Function
Closes a socket.
Returns
A list of two strings. The first string is the command name (“close”) and the second is “ok” if successful.
skt<<Connect(socketname, port)
Function
Connects to a listening socket.
Returns
A list of two strings. The first string is the command name (“connect”) and the second is “ok” for a successful connection or an error sent back by the other socket.
Arguments
socketname
the name of the other socket. If you are connecting to a web server, this is the web address (the name is preferred to the IP address).
port
the port of the other socket to connect through.
skt<<GetPeerName()
Function
Retrieves the address and port of the socket at the other end of the connection.
Returns
A list of four strings. The first echoes the command ("getpeername"). The second is either “ok” or an error. The third and fourth are the address and the port.
skt<<GetSockName()
Function
Retrieves the address and port of the socket at this end of the connection.
Returns
A list of four strings. The first echoes the command ("getsockname"). The second is either “ok” or an error. The third and fourth are the address and the port.
skt<<ioctl(FIONBIO, 1)
Function
Controls the socket’s blocking behavior.
Returns
A list of two strings. The first string is the command name (“ioctl”) and the second is “ok” if successful or an error.
Arguments
FIONBIO, 1
FIONBIO means Non-Blocking I/O. 1 turns on the behavior and the argument.
skt<<Listen()
Function
Tells the server socket to listen for connections.
Returns
A list of two strings. The first echoes the command ("listen") and the second is "ok" or an error message.
skt<<recv(n, <callback, timeout>)
skt<<recvfrom(n, <callback, timeout>)
Function
Receives either a stream message (recv) or a datagram message (recvfrom) from the other socket. If the two optional arguments are used, the data is not received immediately. Instead, the data is received when the function callback is called.
Returns
A list of three strings. The first string is the command name (“recv” or “recvto”). The second is “ok” if successful or an error message if not. The third string is the data that was received. If a callback function is used, a fourth element is the socket that was used in the original recv or recvfrom message.
Arguments
n
specifies the number of bytes to receive from the other socket.
callback
an optional argument that specifies the name of a function to receive the data.
timeout
if you use a callback, timeout specifies how long the function should wait for an answer.
skt<<Send(stream)
skt<<SendTo(dgram)
Function
Sends the data in the argument to the other socket. Send sends a stream and sendto sends a datagram.
Returns
A list of three strings. The first string is the command name (“send” or “sendto”). The second is “ok” if successful or an error message if not. The third string is any portion of the stream that could not be sent, or empty if all the data was sent correctly.
Arguments
stream
the command to send to the other socket.
dgram
the command to send to the other socket.
Note
Either argument might need to contain binary data. JMP represents non-printable ASCII characters with a tilde (~) followed by the hexadecimal number. For example,
skt<<send(("GET / HTTP/1.0~0d~0a~0d~0a");
sends a “get request” to an HTTP server.
SQL
obj<<Custom SQL(sql)
Changes the query to a custom SQL query and sets the SQL.
obj<<Generate SQL
Returns the SQL that the query generates when you run it.
obj<<Modify
Opens the query in Query Builder.
obj<<PostQueryScript(script_as_text)
Sets the JSL script that runs after the query runs each time.
obj<<Query Name(<newName>)
Gets (without the newName argument) or sets (with the newName argument) the name of the query. The name of the query is used as the name of the data table that results from running the query.
obj<<Run(<private|invisible>, <UpdateTable(table)>, <OnRunComplete(script)>, <OnRunCanceled(script)>, <OnError(script)>
Description
Runs the SQL query in the background or foreground depending on the Query Builder preference “Run queries in the background when possible”.
Returns
Null (if the query runs in the background) or a data table (if the query runs in the foreground).
Arguments
private
Optional. Opens the data table that the query produces without displaying it in a data table window. Using private data tables saves memory for smaller tables. However, for large tables (for example, 100 columns and 1,000,000 rows), using a private data table is not helpful the data requires a lot of memory.
invisible
Optional. Hides the data table that the query produces. Use this argument to keep the query result hidden but use it in a subsequent query.
UpdateTable
Optional. Updates the specified data table. Runs the query in the foreground.
OnRunComplete
Optional. Specifies a script to run after the query is complete.
OnRunCanceled
Optional. Specifies a script to run after the user cancels the query.
OnError
Optional. Specifies a script to run if an error occurs.
Notes
If you want the data table that results from the background query, use the OnRunComplete optional argument. You can include a script that runs when the query completes and then assigns a data table reference to the resulting data table. Or you might pass the name of a function that accepts a data table as its first argument. That function is called when the query completes.
Examples
The following example opens a query that you previously saved from Query Builder. The query opens privately, that is, without opening Query Builder. The query runs, and the resulting data table opens.
query = Open( "c:/My Data/Movies.jmpquery", private);
dt = query << Run();
You can include a .jmpquery file in a script and run the query in the background using the <<Run Background message.
query = Include( "C:/Queries/movies.jmpquery");
query <<Run Background();
The following example queries the database, opens the resulting data table, and prints the number of data table rows to the log.
confirmation = Function( {dtResult},
Write( "/!NNumber of rows in query result: ", N Rows( dtResult ) )
);
query = New SQL Query(
Connection(
"ODBC:DSN=SQL Databases;APP=MYAPP;TrustedConnection=yes;WSID=D79255;DATABASE=SQB;"
),
QueryName( "movies_to_update" ),
Select( Column( "YearMade", "t1" ), Column( "Rating", "t1" ) ),
From( Table( "g6_Movies", Schema( "SQB" ), Alias( "t1" ) ) ),
 
);
query << Run( OnRunComplete( confirmation ) );
Run Background(<OnRunComplete(script), <private|invisible>>, <OnRunCanceled(script)>, <OnError(script)>
Description
Runs the SQL query in the background. The running query is not displayed.
Returns
Null (or the data table object, if OnRunComplete is included).
Arguments
OnRunComplete
Optional. Specifies a script to run after the query is complete. To get the resulting data table, include OnRunComplete.
private
Optional. Does not open the resulting data table. Specify only with OnRunComplete. If you include private in a background query, JMP opens the data table as invisible instead. Using private data tables saves memory for smaller tables. However, for large tables (for example, 100 columns and 1,000,000 rows), using a private data table is not helpful because the data requires a lot of memory.
invisible
Optional. Hides the data table. Use this argument to keep the query result hidden but use it in a subsequent query.
OnRunCanceled
Optional. Specifies a script to run after the user cancels the query.
OnError
Optional. Specifies a script to run if an error occurs.
Notes
All queries except for SAS queries run in the background based on the Query Builder preference “Run the queries in the background when possible”, which is selected by default. For SAS queries, Run Background() is ignored.
You can include a .jmpquery file in a script and run the query in the background using the <<Run Background message.
query = Include( "C:/Queries/movies.jmpquery");
query <<Run Background();
Run Foreground(<OnRunComplete(script), <private|invisible>>, <OnRunCanceled(script)>, <OnError(script)>
Description
Runs the SQL query in the foreground.
Returns
A data table that opens when the query is finished.
obj<<Save
Saves the query to its associated file. The save fails if the query does not yet have an associated file.
obj<<Save As(path, <ReplaceExisting(Boolean))
Saves the query to the specified file. If the file already exists, the save fails unless Replace Existing is true.
Other Objects
Zip Archives
list = za<<dir
Returns a list of member names
data = za<<read(membername, <format(blob)>)
Returns a string that contains the entire member data. If the optional argument is specified, the message returns a blob.
Note
For remote files, JMP copies the URL data to the local disk. When the zip archive is no longer accessible, the local data file is deleted.
actualname = za<<write(membername, textstring|blobdata)
Writes a text or blob to a zip archive member file. If the specified membername isn’t in the current zip file, the returned actualname is the same as membername. This member name will be changed to prevent overwriting an existing member; the name actually used is returned. For example,
name1 = za<<write(name, blobdata)
Journals
jnl<<Save HTML(<"path">, <"format">)
Saves the journal as HTML.
path
A quoted string that contains the filepath for the saved HTML file (for example, "c:/myFile.html").
format
The quoted graphic file format. JPG, PNG, and TIFF formats are supported. The graphics are saved in a subdirectory named gfx.
jnl<<Save RTF(<"path">, <"format">)
Saves the journal as an RTF file.
Arguments
path
A quoted string that contains the filepath for the saved RTF file (for example, "c:/myFile.rtf").
format
The quoted file format for the embedded graphics. JPG, PNG, and TIF formats are supported.
jnl<<Save PDF(<"path">, <Show Page Setup(0|1)>, <Portrait(0|1)>)
Saves the journal as a PDF file.
Arguments
path
A quoted string that contains the filepath for the saved PDF file (for example, "c:/myFile.pdf").
Show Page Setup
If set to true, opens the Page Setup window to let the user change the margin, magnification level, and other page layout options.
Portrait
Determines whether the page orientation is portrait or landscape. Overrides the user’s selection in the Show Page Setup window.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset