BookmarkSubscribe
Choose Language Hide Translation Bar
ravi_jmp
Community Trekker

Jmp Script Problem

I am running the following JMP script, joining some files and creating new columns, towards building a combined final report. When I run this script, the last line generates the 'Temp1' table, with all the column names, but no data. If I break the script before this line and run the script from the last line onwards separately, it works fine. Wondering if any one could tell me why I am having to break the script into two.

Thanks,

Ravi

Data Table( "File1" ) << Join(With( Data Table( "File7" )), Merge Same Name Columns, By Matching Columns( :Die = :Die ), Output Table( "FileA" ));

New Column("Die_loc", Character, Nominal, Formula(Substr(:Die, 14, 7)));

Data Table( "File2" ) << Join(With( Data Table( "File8" )), Merge Same Name Columns, By Matching Columns( :Die = :Die ), Output Table( "FileB" ));

New Column("Die_loc", Character, Nominal, Formula(Substr(:Die, 14, 7)));

Data Table( "File3" ) << Join(With( Data Table( "File9" )), Merge Same Name Columns, By Matching Columns( :Die = :Die ), Output Table( "FileC" ));

New Column("Die_loc", Character, Nominal, Formula(Substr(:Die, 14, 7)));

Data Table( "FileA" ) << Join(With( Data Table( "FileB" )), Merge Same Name Columns, By Matching Columns( :Die_loc = :Die_loc ), Output Table( "Temp1" ));

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User ms
Super User

Jmp Script Problem

One possibility is that the evaluation of formulas in the new columns has not finished before the final Join(). Try if inserting Eval Formula in each New Column() helps.

New Column("Die_loc", Character, Nominal, Formula(Substr(:Die, 14, 7)), Eval Formula);

0 Kudos
6 REPLIES 6
ms
Super User ms
Super User

Jmp Script Problem

One possibility is that the evaluation of formulas in the new columns has not finished before the final Join(). Try if inserting Eval Formula in each New Column() helps.

New Column("Die_loc", Character, Nominal, Formula(Substr(:Die, 14, 7)), Eval Formula);

0 Kudos
pmroz
Super User

Jmp Script Problem

You can also force some buffers to be flushed with the wait command:

wait(0);

0 Kudos
ravi_jmp
Community Trekker

Jmp Script Problem

PMroz, your suggestion works too. Thanks

0 Kudos
ravi_jmp
Community Trekker

Jmp Script Problem

Thanks for the suggestion MS, that worked.

0 Kudos
David_Burnham
Super User

Jmp Script Problem

Send the message Run Formulas to the data table.  This message completes all formula evaluations before proceeding to the next JSL statement.

-Dave
0 Kudos
GoodMan
Community Trekker

Jmp Script Problem

Hi Ravi, Can you let me know the function of the following JSL in your code. Thanks,Kun.

Formula(Substr(:Die, 14, 7))

0 Kudos