Is it possible to extract the script behind a JMP Table?For example, we can manually right click on the top-left red icon in a report and hit save script --> To script window.
Is there a way to do this as a JSL script? This is because I want to manipulate the script to make combined data table further. Thanks for the help.
Re: Is it possible to extract the script behind a JMP Table?Hi Jeff, I actually want to save the copying and pasting my team goes through in order to make tables for a final development report. They always have to manually do combined data table and extract columns from each of the tables.
I am looking to run this script against different source tables even though I am not sure if they will have the same column names.
The model form that I want to fit will always be using Fit Model.
My goal is to leave the end user with a table that would have some columns from Analysis of Variance, Summary of fit and Scaled Estimates from the jmp table they would run the script against. It will save them time while writing reports where they wouldn't have to copy-paste from different Jmp reports manually. I hope that makes sense??
Thanks for the help.
Re: Is it possible to extract the script behind a JMP Table?Thank you @txnelson I will look into the Scripting guide
Re: Is it possible to extract the script behind a JMP Table?Thanks, that helps too.
More questions though:
- I'm still not certain we've gotten to the bottom of what you're trying to accomplish. Is there a particular analysis you're trying to make easy for other people? Are you just trying to speed up something you currently do by hand?
- Are you looking for the script to run against different source tables? If so, do these tables have the same column names as the table you've built your current script from?
- If not, is the model form you want to fit using Fit Model fixed? The reason I ask is that the Fit Model launcher dialog is really flexible and I wouldn't want you to try to recreate that.
- Is your goal to leave the user with the data table of statistics from the Fit Model report? If so, what is the purpose of that? What further analysis do you want the user to do with those statistics in that form?
A couple of other notes.
The process for generalizing a platform script is to replace the column references in a script with script variables and then use New Window() to prompt the user for the columns they would like to use. Again, this is complicated with Fit Model if the model form isn't fixed, so, here's an example using Distribution.
Start with the script for Distribution using Big Class:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dist_list = dt << Distribution( Y( :height, :weight ) );
//Note that the Distribution() returns a list of platforms.
//Therefore I have to index into that list to get the report for one of them
Report( dist_list[1] )[Outline Box( "Summary Statistics" )][Table Box( 1 )] <<
make combined data table;
Now, I want to generalize it to replace the column references with a JSL variable, in this case y_cols.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
y_cols = {:height, :weight};
//The Eval()below tells JMP to evaluate the variable
//before evaluating the Distribution().
dist_list = dt << Distribution( Y( Eval( y_cols ) ) );
Report( dist_list[1] )[Outline Box( "Summary Statistics" )][Table Box( 1 )] << make combined data table;
Now, I want to use New Window() to prompt the user for the columns to use.
dt=current data table();
//The Column Reference argument for Get Selected was added in JMP 13.1
dist_prompt = New Window( "Choose Columns for Distribution",
<<MODAL></MODAL>
That's the basic idea for generalizing a script. The answers to the questions above will help you with your specific needs. We'll need those details.
Re: Is it possible to extract the script behind a JMP Table?Hi Jeff,
This is how my script is:
dt=Open("C:\Users\myfile.jmp");
fm = Fit Model(
Y( :Name( "ABC Molecule" ) ),
Effects(
:Name( "ABCD" ),
:Timing 1,
:Timing 2,
:Timing 3,
:Temperature,
:pH,
:Name( "ABCD" ) * :Temperature,
:Name( "ABCD" ) * :pH,
:Timing 2 * :Timing 3,
:Timing 2 * :Temperature,
:Temperature * :pH,
:Name( "ABCD" ) * :Name( "ABCD" ),
:Timing 3 * :Timing 3
),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
:Name( "ABCD" ) << {Scaled Estimates( 1 ),
Analysis of Variance( 1 ), Parameter Estimates( 1 ),
}
)
);
fmr=fm<<REPORT> F")[1::row1];
vals6=Column(b,"Column 2")[2::2];
d=NewTable("Result",NewColumn("Y",Character,Nominal,Values(vals)),NewColumn("Term",Character,Nominal,Values(vals2)),NewColumn("Scaled Estimate",Numeric,Continuous,Values(vals3)),NewColumn("F Ratio",Numeric,Continuous,Values(vals4)),NewColumn("Prob > F",Numeric,Continuous,Values(vals5)),NewColumn("RSquare Adj",Numeric,Continuous,Values(vals6)));</REPORT>
For now, I am just randomly combining columns from these three tables. Can you direct me as to how I can write a more generalized script to accomplish this for different tables? Thanks
Re: Is it possible to extract the script behind a JMP Table?JSL will certainly allow one to write a generic version of the code. It is a very powerful language. I suggest that you start down that path by reading the Scripting Guide
Help==>Books==>Scripting Guide
and then familiarize yourself with the Scripting Index
Help==>Scripting Index
It is the Scripting Index that really gives you the details of what all is available with the different objects in JMP. It also gives you examples of each.
Best of luck in your work on the generic version of the code: Remember, the Discussion Group Community will be there to help you over any issues you run into as you are learning and implementing JSL.
Re: Is it possible to extract the script behind a JMP Table?
@powerpuff wrote:
Thanks for the help Jeff, I already have it working for one table. Also, I have one column that is same in all the three tables so I will probably join using that column. But I want a more general script that would work for many other tables. Is that possible? Thanks
I'm not clear how you have a column that is the same from the three report tables that have been made into data tables.
It's great that you have a script working for one data table that you're ready to generalize. Yes, it's possible to generalize it, but, as shown by the length of this thread, it's difficult to know exactly which part you're struggling with in the abstract. Could you post an example of your script that works on one data table and then we can help point you in the best direction for generalizing it to work with abitrary data tables.
Re: Is it possible to extract the script behind a JMP Table?Thanks for the help Jeff, I already have it working for one table. Also, I have one column that is same in all the three tables so I will probably join using that column. But I want a more general script that would work for many other tables. Is that possible? Thanks
Re: Is it possible to extract the script behind a JMP Table?That helps a lot. There are still some questions but I think we can help you more now.
Let's take this one step at a time.
Let's get a script working on one data table and then we can worry about generalizing it.
Here's a script that creates three data tables from the Summary of Fit, Analysis of Variance, and Scaled Estimates reports from Fit Model using Big Class.
dt=open("$SAMPLE_DATA\Big Class.jmp");
fm=dt<<FIT model=""></FIT>
As you can see, it creates three data tables with different column and row configurations.

How do you want these combined into one data table. Concatenating them would result in a strange looking table like this:

Without a matching column you can't join them either. So, I'm confused about combining them.
Re: Is it possible to extract the script behind a JMP Table?I want to be able to write a script that would make combined data table for
1) Summary of Fit
2) Analysis of Variance
3) Scaled Estimate
for different JMP Tables and then extract only certain columns from these 3 combined data tables. I want to have a single script that should be able to work for all the tables. Does that make sense? Please let me know if there's any other way I can achieve something like this. Thanks.
Re: Is it possible to extract the script behind a JMP Table?@powerpuff, I've read this thread a couple of times and I'm not sure I understand what problem you're trying to solve by getting a platform script into a script window through JSL.
This is a rather unusual and, while I can imagine situations where it might be useful, it's not something that strikes me as general purpose.
Could you start back at the beginning and describe as fully as possible what you're trying to do?
Are you writing a script that others will run or only for yourself?
You said:
@powerpuff wrote:
I want to extract the script to a script window and add some more code to it to make multiple combined data tables and then make a resulting table from columns I extract using the make combined data table function.
And:
@powerpuff wrote:
I want to write a script that would go to the JMP report and do the save script to --> script window and then make additions to the script so that I can acquire only certain columns from the report table. I have many tables that I need data from, hence I want to be able to extract the script and manipulate it accordingly.
Can you expand on what you mean by "add some more code to it" and "acquire only certain columns from the report table"?
There are lots of ways to manipulate reports and data directly in JSL without having to go through the script editor to manipulate a script you retrieved through JSL. We just need to understand more of what your ultimate goal is rather than the solution you headed down using the script window.
Re: Is it possible to extract the script behind a JMP Table?right-click and select reformat script
Re: Is it possible to extract the script behind a JMP Table?This somehow doesnt seem to work. The output I acquire looks like this.
Whereas I am looking for something like this:

Re: Is it possible to extract the script behind a JMP Table?You can reformat the script in the ScriptBox to make it appear nicely in the Script Window.
Window( "Script Window" )[Script Box(1)] << Reformat();
Re: Is it possible to extract the script behind a JMP Table?Also, the script that I acquire is spread horizontally across the script window. Is it possible to acquire the script vertically in the script window?
Re: Is it possible to extract the script behind a JMP Table?This is somewhat closer to what I was looking for. Thanks a lot.
Re: Is it possible to extract the script behind a JMP Table?This code will find table scripts for fit model and pop them into a script window
dt = open("$SAMPLE_DATA/Big Class.jmp");
// check whether the current data table contains any scripts
// for least squares regression
lstModelNames = {}; // name of scripts
lstModelScripts = {}; // script contents
If (NTable()>0,
lstTableScripts = Current Data Table() << Get Table Script Names;
For (i=1,i<=NItems(lstTableScripts),i++,
s = Current Data Table() << Get Property(lstTableScripts[i]);
str = Char(NameExpr(s));
If (Left(str,7)!="JMP App" & Contains(str,"Standard Least Squares") & !Contains(str,"Generalized Regression"),
InsertInto(lstModelNames,lstTableScripts[i]);
InsertInto(lstModelScripts,NameExpr(s));
)
)
);
// launch script windows
For (i=1,i<=NItems(lstModelScripts),i++,
New Window(lstModelNames[i], <<SCRIPT>&amp;amp;amp;amp;amp;amp;amp;amp;lt;/PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;But if they are in a script window then you have to manually make the edits.&amp;amp;amp;amp;amp;amp;amp;amp;nbsp; Alternatively just treat the scripts as either expressions or as strings and manipulate them in code.&amp;amp;amp;amp;amp;amp;amp;amp;nbsp; For example:&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;amp;amp;amp;lt;PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;CODE class=" language-jsl"&amp;amp;amp;amp;amp;amp;amp;amp;gt;// run the model invisiblely and create a handle 'fm'
// that references the model object
s = lstModelScripts[1];
str = Char(NameExpr(s));
str = "fm =" || str;
SubstituteInto(str,"Fit Model(","Fit Model(Invisible,");
Eval(Parse(str));
// ensure summary of fit is available
fm &amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt; Summary Of Fit(1);
// grab the R-sq from the report window
rep = fm &amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt; Report;
ob = rep[OutlineBox("Summary of Fit")];
values = ob[NumberColBox(1)] &amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt; Get;
Rsquare = values[1];
// close the model object
rep &amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt; Close Window;
show(RSquare);&amp;amp;amp;amp;amp;amp;amp;amp;lt;/CODE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-sub id="lingo-sub-51777" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-sub&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-body id="lingo-body-51777" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;Thank you so much. I would really appreciate it if you could provide me with some code I can look up to. Thanks&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-sub id="lingo-sub-51767" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-sub&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-body id="lingo-body-51767" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;I want to write a script that would go to the JMP report and do the save script to --&amp;amp;amp;amp;amp;amp;amp;amp;gt; script window and then make additions to the script so that I can acquire only certain columns from the report table. I have many tables that I need data from, hence I want to be able to extract the script and manipulate it accordingly.&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;Thanks&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-sub id="lingo-sub-51759" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-sub&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-body id="lingo-body-51759" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;This is a long discussion thread so not sure if you have got your answer - if not, let me know, it can be done - and I have some code I can dig out if it will help&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-sub id="lingo-sub-51681" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-sub&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-body id="lingo-body-51681" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;If you really want the script to appear in a Script Window, you can use the Save Script to Script Window message. But I am not sure what you would do with that.&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;amp;amp;amp;lt;PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;CODE class=" language-jsl"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
dist = dt &amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt; Distribution(
Continuous Distribution( Column( :weight ) ),
Nominal Distribution( Column( :age ) )
);
dist &amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt; Save script to script window();&amp;amp;amp;amp;amp;amp;amp;amp;lt;/CODE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;Or you could always put the script into a new script editor window from the Get Script result. You could add to this script yourself, but I still don&amp;amp;amp;amp;amp;amp;amp;amp;amp;#39;t think I am following what you are looking to do.&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;amp;amp;amp;lt;PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;CODE class=" language-jsl"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
dist = dt &amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt; Distribution(
Continuous Distribution( Column( :weight ) ),
Nominal Distribution( Column( :age ) )
);
script = Char( dist &amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt; Get Script() );
nw = New Window( "Not the Script Window",
&amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;Script,
Names Default To Here( 1 );
"\[dt = Open( "$SAMPLE_DATA\Big Class.jmp" ); obj = dt&amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;]\" || script
);
nw[ScriptBox(1)] &amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt; Reformat();&amp;amp;amp;amp;amp;amp;amp;amp;lt;/CODE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-sub id="lingo-sub-51667" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-sub&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-body id="lingo-body-51667" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;Going down the path of parsing a script is sometimes the only way to get what you need.&amp;amp;amp;amp;amp;amp;amp;amp;nbsp; However, it has been my experience that unless you are looking for things a user may have changed and you need to pick those changes up, reconstructing the code from scratch is typically a simpler approach.&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;BTW, don&amp;amp;amp;amp;amp;amp;amp;amp;amp;#39;t forget to examine the user preferences.&amp;amp;amp;amp;amp;amp;amp;amp;nbsp; The scripts extracted will not provide you with settings that a user may have set by setting preferences.&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-sub id="lingo-sub-51656" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-sub&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-body id="lingo-body-51656" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;I want to extract the script to a script window and add some more code to it to make multiple combined data tables and then make a resulting table from columns I extract using the make combined data table function.&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-sub id="lingo-sub-51653" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-sub&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-body id="lingo-body-51653" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;I don&amp;amp;amp;amp;amp;amp;amp;amp;amp;#39;t think you want to parse through the script, when you can easily get the model variables by retrieving them directly from the ouput of the run Model.&amp;amp;amp;amp;amp;amp;amp;amp;nbsp; See the simple script below&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;amp;amp;amp;lt;PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;CODE class=" language-jsl"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Fitness.jmp" );
// Run the Stepwise and the resulting model
obj = Fit Model(
Y( :Oxy ),
Effects(
:Runtime,
:Weight,
:RunPulse,
:RstPulse,
:MaxPulse
),
Personality( Stepwise ),
Run
);
// run the stepwise
obj &amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt; Go;
// run the model
mod = obj &amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt; Run Model;
// Capture from the Effect Tests output, the list of
// variables that were run in the model
Variables = report(mod)["EffectTests"][StringColBox(1)]&amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;get;
show(Variables);&amp;amp;amp;amp;amp;amp;amp;amp;lt;/CODE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-sub id="lingo-sub-51651" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-sub&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-body id="lingo-body-51651" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;Generally, JMP objects understand this message, including data tables:&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;amp;amp;amp;lt;PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;CODE class=" language-jsl"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Data Table( "Big Class" ) &amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt; Get Script;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/CODE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-sub id="lingo-sub-51648" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-sub&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-body id="lingo-body-51648" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Hi Justin,&amp;amp;amp;amp;amp;amp;amp;amp;lt;BR /&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;BR /&amp;amp;amp;amp;amp;amp;amp;amp;gt;Thank you for your response. Can you tell me how do you choose the script variables? I am trying to extract a script from Stepwise regression. Thanks.&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-sub id="lingo-sub-51642" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-sub&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-body id="lingo-body-51642" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;Not sure if this is what you&amp;amp;amp;amp;amp;amp;amp;amp;amp;#39;re trying to do, but if you want&amp;amp;amp;amp;amp;amp;amp;amp;nbsp;to dynamically get a JSL script for a Platform into a JSL expresison variable, you can send the Get Script message to the platform. In the below example, the script variable will have the same script that would appear in the Script Window if you save to it from the Red Triangle Menu.&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;amp;amp;amp;lt;PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;CODE class=" language-jsl"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
dist = dt &amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt; Distribution(
Continuous Distribution( Column( :weight ) ),
Nominal Distribution( Column( :age ) )
);
script = dist &amp;amp;amp;amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;amp;amp;amp;lt; Get Script();&amp;amp;amp;amp;amp;amp;amp;amp;lt;/CODE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;Script variable:&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;amp;amp;amp;lt;PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;CODE class=" language-jsl"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Distribution(
Continuous Distribution( Column( :weight ) ),
Nominal Distribution( Column( :age ) )
)&amp;amp;amp;amp;amp;amp;amp;amp;lt;/CODE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/PRE&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-sub id="lingo-sub-51640" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-sub&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-body id="lingo-body-51640" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;Yes, I know I can do that manually, my question was: Can this be done in a jsl script?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-sub id="lingo-sub-51638" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-sub&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-body id="lingo-body-51638" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/10894"&amp;amp;amp;amp;amp;amp;amp;amp;gt;@powerpuff&amp;amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;amp;gt;,&amp;amp;amp;amp;amp;amp;amp;amp;lt;BR /&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;nbsp; &amp;amp;amp;amp;amp;amp;amp;amp;nbsp; &amp;amp;amp;amp;amp;amp;amp;amp;nbsp; &amp;amp;amp;amp;amp;amp;amp;amp;nbsp; &amp;amp;amp;amp;amp;amp;amp;amp;nbsp;You should be able to save that as well to a Script Window as shown below.&amp;amp;amp;amp;amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;amp;amp;amp;amp;lt;BR /&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;nbsp; &amp;amp;amp;amp;amp;amp;amp;amp;nbsp; &amp;amp;amp;amp;amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;amp;amp;amp;amp;lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 855px;"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;img src="https://us.v-cdn.net/6038925/uploads/images/9408i7F08CE376D174E87/image.png" role="button" title="image.png" alt="image.png" /&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-sub id="lingo-sub-51636" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-sub&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-body id="lingo-body-51636" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;I was actually talking about the little red button after you open up one of the reports below &amp;amp;amp;amp;amp;amp;amp;amp;amp;#39;source&amp;amp;amp;amp;amp;amp;amp;amp;amp;#39; option.&amp;amp;amp;amp;amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;amp;amp;amp;amp;lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 133px;"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;img src="https://us.v-cdn.net/6038925/uploads/images/9407i5B8CE2F07282DE13/Capture.PNG" role="button" title="Capture.PNG" alt="Capture.PNG" /&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-sub id="lingo-sub-51634" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-sub&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;lingo-body id="lingo-body-51634" slang="en-US"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/10894"&amp;amp;amp;amp;amp;amp;amp;amp;gt;@powerpuff&amp;amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;amp;gt;,&amp;amp;amp;amp;amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;amp;amp;amp;amp;lt;BR /&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;nbsp; &amp;amp;amp;amp;amp;amp;amp;amp;nbsp; &amp;amp;amp;amp;amp;amp;amp;amp;nbsp; &amp;amp;amp;amp;amp;amp;amp;amp;nbsp; Look for a button which say&amp;amp;amp;amp;amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;Source&amp;amp;amp;amp;amp;amp;amp;amp;amp;quot; and right click that in the table&amp;amp;amp;amp;amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 232px;"&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;img src="https://us.v-cdn.net/6038925/uploads/images/9406iDE394B3B533BD3D8/image.png" role="button" title="image.png" alt="image.png" /&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;nbsp; &amp;amp;amp;amp;amp;amp;amp;amp;nbsp; &amp;amp;amp;amp;amp;amp;amp;amp;nbsp; &amp;amp;amp;amp;amp;amp;amp;amp;nbsp; If you hit - &amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;edit&amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;, you will be able to see the script that JMP generated for the table.&amp;amp;amp;amp;amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/P&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/lingo-body&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;lt;/CODE&amp;amp;amp;gt;&amp;amp;amp;lt;/PRE&amp;amp;amp;gt;&amp;amp;amp;lt;/LINGO-BODY&amp;amp;amp;gt;&amp;amp;amp;lt;lingo-sub id="lingo-sub-51681" slang="en-US" mode="CREATE"&amp;amp;amp;gt;Re: Is it possible to extract the script behind a JMP Table?&amp;amp;amp;lt;/lingo-sub&amp;amp;amp;gt;&amp;amp;amp;lt;lingo-body id="lingo-body-51681" slang="en-US" mode="CREATE"&amp;amp;amp;gt;&amp;amp;amp;lt;P&amp;amp;amp;gt;If you really want the script to appear in a Script Window, you can use the Save Script to Script Window message. But I am not sure what you would do with that.&amp;amp;amp;lt;/P&amp;amp;amp;gt;
&amp;amp;amp;lt;PRE&amp;amp;amp;gt;&amp;amp;amp;lt;CODE class=" language-jsl"&amp;amp;amp;gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
dist = dt &amp;amp;amp;lt;&amp;amp;amp;lt; Distribution(
Continuous Distribution( Column( :weight ) ),
Nominal Distribution( Column( :age ) )
);
dist &amp;amp;amp;lt;&amp;amp;amp;lt; Save script to script window();&amp;amp;amp;lt;/CODE&amp;amp;amp;gt;&amp;amp;amp;lt;/PRE&amp;amp;amp;gt;
&amp;amp;amp;lt;P&amp;amp;amp;gt;Or you could always put the script into a new script editor window from the Get Script result. You could add to this script yourself, but I still don't think I am following what you are looking to do.&amp;amp;amp;lt;/P&amp;amp;amp;gt;
&amp;amp;amp;lt;PRE&amp;amp;amp;gt;&amp;amp;amp;lt;CODE class=" language-jsl"&amp;amp;amp;gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
dist = dt &amp;amp;amp;lt;&amp;amp;amp;lt; Distribution(
Continuous Distribution( Column( :weight ) ),
Nominal Distribution( Column( :age ) )
);
script = Char( dist &amp;amp;amp;lt;&amp;amp;amp;lt; Get Script() );
nw = New Window( "Not the Script Window",
&amp;amp;amp;lt;&amp;amp;amp;lt;Script,
Names Default To Here( 1 );
"\[dt = Open( "$SAMPLE_DATA\Big Class.jmp" ); obj = dt&amp;amp;amp;lt;&amp;amp;amp;lt;]\" || script
);
nw[ScriptBox(1)] &amp;amp;amp;lt;&amp;amp;amp;lt; Reformat();&amp;amp;amp;lt;/CODE&amp;amp;amp;gt;&amp;amp;amp;lt;/PRE&amp;amp;amp;gt;&amp;amp;amp;lt;/lingo-body&amp;amp;amp;gt;</SCRIPT>