Thanks. This worked.
If the names of the tables to be concatenated also changes, the following should work.
theExpr = " Data Table( \!"" || MaskList[1] || " " || Char( 2 ) || "\!") << Concatenate(";
For( i = 2, i <= N Items(MaskList), i++,
theExpr = theExpr || " Data Table( \!"" || MaskList[i] || " " || Char( 2 ) || "\!"),"
);
theExpr = theExpr || "Output Table( \!"Final Table\!" ) );";
Eval( Parse( theExpr ) );
In the code above,
MaskList is a list that holds a variable number of masks depending on the user. There are tables associated with each mask in MaskList.
For example, the first table is called Mask1 2, (the second table with the name called Mask1, hence the extra 2) the next table to be concatenated is called Mask9 2. (the second table with the name called Mask9, hence the extra 2) and so on.
This will concatenate, Mask1 2 with Mask9 2 and so on.
Just putting this here for documentation purposes.