The Combine Columns message is doing the same as Cols > Utilities > Combine Columns.
Combine Columns doesn't support any conditionalizing.
Instead, I'd create a new column with a formula to concatenate your other columns as you desire.
Here's what the formula would look like in the Formula Editor.
And here's the JSL to create it.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
// Combine columns
dm1 = ":";
dm2 = "-";
Eval(
Substitute(
Expr(
dt << New Column( "ID",
Character,
"Nominal",
Formula( :name || If( :age <= 13, d1, d2 ) || Char( :age ) ),
)
),
Expr( d1 ), dm1,
Expr( d2 ), dm2
)
);
-Jeff