I'm having a problem where simple JMP commands are not working in some scripts where they are working as promised in other scripts. An example is the concatenate function. In the first example, the script works and functions with previously defined variables:
dt3 = Pick File("Select JMP database file to update"); Open (dt3);
//adds new data to end of database Concatenate (dt1, append to first table);
In the second example, the only way I am able to get the code to work is by using the explicit data table names. Previously defined variables, when used in the function arguments, do not work.
Data Table("Name of Main Table" ) << Concatenate( Data Table( "Name of Data Table with new data" ), append to first table );
Has anyone had this happen to them before? Is there any reason why this would happen? I would love to know how to avoid this so that I can make my code more modular.
Note the JSL Scripting Index displays the syntax for Tables > Concatenate as shown below. It is not Concatenate( dt1, dt2). See the script below. Test the script.It has teh correct syntax. Note Pick File() returns a file name. dt3 = Open(fid) assigns a handle, a data table reference, to the opened table.
Names Default to Here(1);
dt = Open("$Sample_Data/Big Class.jmp");
//select from the sample data table Big Class Families
fid = Pick File("Select JMP database file to update");
dt3 = Open(fid);
//adds new data to end of database
dt << Concatenate( dt3,
Create source column, Append to first table);