I am working on joining (2) tables in a JSL script. The issue i'm having is with saving the newly joined tables. There are (2) issues.
The first issue is that the Data columns of (Test2) are coming in to JMP as Character/Nominal and need to be Numeric/Continuous. When i change or create the Excel spreadsheet column format to numeric i get the following error at the dt3 <<save as line of code.
Send Expects Scriptable Object in access or evaluation of 'Send' , dt3 << /*###*/save as("B:\JoinTest1_2.jmp") /*###*/
When i try to format the JMP data table column format in JSL i get the same error during the save as instruction.
I have searched this for hours and just cant figure it out.
Here is my code. Any help would be greatly appreciated.
Names Default To Here( 1 );
dt1 = open("B:\Test1.jmp");
dt2 = Open("B:\Test2.jmp",
Worksheets( "WorkSheet1" ),
Use for all sheets( 1 ),
Concatenate Worksheets( 0 ),
Create Concatenation Column( 0 ),
Worksheet Settings(
1,
Has Column Headers( 1 ),
Number of Rows in Headers( 1 ),
Headers Start on Row( 1 ),
Data Starts on Row( 2 ),
Data Starts on Column( 1 ),
Data Ends on Row( 0 ),
Data Ends on Column( 0 ),
Replicated Spanned Rows( 1 ),
Replicated Spanned Headers( 0 ),
Suppress Hidden Rows( 1 ),
Suppress Hidden Columns( 1 ),
Suppress Empty Columns( 1 ),
Treat as Hierarchy( 0 ),
Multiple Series Stack( 0 ),
Import Cell Colors( 0 ),
Limit Column Detect( 0 ),
Column Separator String( "-" )
)
);
column(dt2,"Column1") << data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);
column(dt2,"Column2") << data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);
column(dt2,"Column3") << data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);
column(dt2,"Column4") << data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);
dt3 = Data Table( dt1 ) << Join(
With( Data Table( dt2) ),
By Matching Columns( :Column1 ),
Drop multiples( 0, 0 ),
Include Nonmatches( 1, 0 ),
Preserve main table order( 1 ),
);
Close (dt1, no save);
Close (dt2, no save);
//dt3 << select where(:Sample ID ==0);
//dt3 << delete rows();
dt3 << save as ("B:\JoinTest1_2")