BookmarkSubscribeSubscribe to RSS Feed

How to use JSL to generate control chart and save the scripts in data table

Highlighted
midori555

Community Member

Joined:

Aug 8, 2018

I was trying to generate the control chart and save the lengthythe script to the data table at the same time. The control chart script is lengthy. So instead of doing copy & paste the long script shown below is there a sophisticated way to do it?

Any help appreciated. 

 

 

Names Default To Here( 1 );
dt = Current Data Table();
Control Chart(
SendToByGroup( {:group == "A"} ),...
....
);
dt << New Script(
"Control Chart by weight",
Control Chart(
SendToByGroup( {:group == "A"} ),...
...
);
 

 

1 REPLY
txnelson

Super User

Joined:

Jun 22, 2012

You can save the script right with the generation of the Control Chart.  Here is the example from the Scripting Index that shows you how you can do it.  You can do the same with the code you displayed, without having to do a separate step.

Names Default To Here( 1 );
dt = Open(
	"$SAMPLE_DATA/Quality Control/Coating.jmp"
);
obj = Control Chart(
	Sample Size( 1 ),
	Chart Col( :Weight ),
	Chart Type( Run Chart )
);
obj <<
Save Script to Data Table(
	"My Analysis",
	<<Prompt( 0 ),
	<<Replace( 0 )
);
Jim