How to export the LSL, USL and Units of all columns (with spec limits data only) into a Data Table using JSL?Automation and ScriptingRe: How to export the LSL, USL and Units of all columns (with spec limits data only) into a Data Table using JSL?Here is an example of how I would do it
names default to here(1);
dt =
// Open Data Table: semiconductor capability.jmp
// → Data Table( "semiconductor capability" )
Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
// Get all numeric columns
allNums = dt << get column names(numeric);
obj = dt << Manage Limits( process variables(eval(allNums)), invisible );
obj << Save to Tall Limits Table;
wait(0);
obj << close window;
limitdt = current data table();
limitdt << select where(isMissing(:LSL)&isMissing(:USL)&isMissing(:Target));
limitdt << delete rows;
Re: How to export the LSL, USL and Units of all columns (with spec limits data only) into a Data Table using JSL?Thanks Jim!
Another question,
how can I merge the limits data table generated to the tabulated statistics?
here's the script for tabulated stats:
Names Default To Here( 1 );
dt = Current Data Table();
allNums = dt << get column names( Numeric );
// Generate the mean/std table
tab = dt << (Tabulate(
Show Control Panel (1),
Add Table(
Column Table( Statistics( N) ),
Column Table( Statistics( Mean ) ),
Column Table( Statistics( Std Dev ) ),
Column Table( Statistics( Min ) ),
Column Table( Statistics( Max ) ),
Row Table( Analysis Columns( Eval( allNums ) ) )
),
Local Data Filter(
Add Filter(
columns (:HBIN), Where( :HBIN == 1 ),
display (:HBIN)
)
)
));
tab << Make Into Data Table;
tab << close window;
SumDT = Current Data Table();
SumDT << set name( "Summary Data" );
I want to merge the limits and stats into 1 table so I can add the CPK as well
Output should look like this:

Re: How to export the LSL, USL and Units of all columns (with spec limits data only) into a Data Table using JSL?Use Manage Limits with spec table (the table Jim's script creates) to add column properties to your table created from tabulate

Re: How to export the LSL, USL and Units of all columns (with spec limits data only) into a Data Table using JSL?And if you wish to have separate columns for LSL/USL instead of column properties, you can just update/join the spec table to your tabulated table.
Re: How to export the LSL, USL and Units of all columns (with spec limits data only) into a Data Table using JSL?All you have to do is to Join the data tables by the column named Variable in the Limits data table to the column named Analysis Columns in the Tabulate data table. If you first do this interactively using
Tables=>Join
the JSL used to do the joining will be displayed in the log. Or you can look in the source table variable in the newly created joined data table and it will have the script there too.
Here is an example from the Scripting Index using JSL to join 2 tables
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Trial1.jmp" );
dt2 = Open( "$SAMPLE_DATA/Little.jmp" );
dt << Join(
With( Data Table( "Little" ) ),
Select( :popcorn, :oil amt, :batch, :yield ),
SelectWith( :yield ),
By Matching Columns( :popcorn = :popcorn, :batch = :batch, :oil amt = :oil )
);