Is there any way to put a long formula for a column to another JSL file. My table has a column which has an about 1000 lines formula. I want to put this formula to another JSL file so that the main file will look like cleaner.
The way to add a column formula to a table using JSL is like this:
dt = open("$sample_data\Big Class.jmp");
dt << New Column( "BMI", Numeric, Continuous, Format( "Fixed Dec", 12, 2 ),
// Your formula goes here:
Formula( ((:weight * 703) / :height) / :height )
// end formula
I'm re-reading your post. Perhaps you simply need the INCLUDE statement? Just put the statements to add the new column in another JSL file (called new_column.jsl for example). Then in your main program you would have this:
If there are multiple formula columns and some of the formula columns use other formula columns, JMP needs to see the relationships to determine which columns must evaluate first. If you move the formula out of the column, JMP will not get the evaluation order correct for columns that are dependent on other columns.
If you create a user defined function, AND you make sure it is defined ahead of time, you can call it from the column formula. This seems clumsy, maybe a better idea will pop up.