BookmarkSubscribeRSS Feed

JSL Script

I am new to JMP script.

I wrote two simple scripts to run my table. One is to add one column and do a calculation. The other is to plot the graph to "Fit Y by X".

If I run the two scripts seperately, both work.

If I combine the two into one script, JSL only run the first part of adding column and doing the calculation, but does not plot the graph?

Can anyone tell me why?

Thanks a lot for help. I appreciate it.


Re: JSL Script

Post your script. I'll take a look at it. Look out for Less than and greater than signs though, they will mess up the post.

Re: JSL Script

I don't know why I cannot post all my script here. It always truncate the script.

Message was edited by: HL

1st script

caption="please open the file";

2nd script

Y( :actualValue,Gm ),
X( :Name( "Vg(V)") ),
//Fit Each Value( {Line Color( "Red" )} ),
//By( :Wafer, :Module, :X, :Y )

my scripts

The above two scripts run well separately. But when I combine them together, it only run the 1st one.

Or should I include a fuinction to combine the two scripts into one in order to run them together?

I appreciate your help.

Re: my scripts

So I think your first script was cut off at colA = ]]]] but I think I get the idea.

Put the script that creates the Data Table before the Bivariate script, so it uses that Data Table.

To create the Bivariate graph you need to put it into a Window. To do this use this sytax:

wind = New Window( "Bivariate", Bivariate(
Y( :actualValue,Gm ),
X( :Name( "Vg(V)") ),
//Fit Each Value( {Line Color( "Red" )} ),
//By( :Wafer, :Module, :X, :Y )

Then you can do different things with the wind variable like save it, close it, pull different data, or nothing.

Hope this Helps

Re: my scripts

Thanks for your quick reply.

I copy your script to my 1st script and run the script. It still run the data table calculation only but did not plot the graph.

I run your script separately and it did work.

I really don't know why JSL cannot run them in one script.

BTW, the first script is to open an excel sheet and add some columns and then did the column calculation.


Community Trekker


Jun 23, 2011

Re: my scripts

I'm not sure if this is your problem, because I can't see the whole script, but
if you create a column with a formula in it then you need to add the command
dt << run formulas;
where dt refers to your data table, before you do any analyses. The problem is that the formula is evaluated in the background and the next platform executes before the column has finished evaluating. When I have scritps that run one part at a time but fail as a whole script most of the time it is due to this run formula issue. The other problem I encounter is that the wrong data table is current, so an explicit
current data table(dt);
is sometimes required.
Hope that helps.

Super User


Jun 23, 2011

Re: JSL Script

I'm attaching below a simple script that does the kind of thing you are trying to do. It works for me in 8.0.1. Assuming you can get it to run, then try to modify it step by step until it is the exact script you want.


dt = New Table( "My Table", New Column( "A" ), New Column( "B" ) );
colA = Column( "A" );
colB = Column( "B" );
dt << addrows( 5 );

For( i = 1, i < 6, i++,
colA(i) = Random Normal();
colB(i) = Random Normal();

dt << Bivariate( X( "A" ), Y( "B" ) );

NOTE: In the For loop, you MUST replace the round brackets in colA(i) and colB(i) with square brackets for correct syntax. I just cannot do that in the code here because it gets truncated as you have already seen.