You could loop over all the possible column names and if match is found, add it to associative array (and remove from the column listing if you want to)
Names Default To Here(1);
input_cols = {"LOAN", "MORTDUE", "VALUE", "REASON", "JOB", "YOJ", "DEROG", "DELINQ", "CLAGE", "NINQ", "CLNO", "DEBTINC"};
dt = Open("$SAMPLE_DATA/Equity.jmp");
part = dt << Partition(
Y(:BAD),
X(Eval(input_cols)),
Validation Portion(0.3)
);
part << go;
part << save leaf label formula;
part << close window;
aa_cols = Associative Array();
For Each({row_val}, dt[1::10, "Leaf Label Formula"],
input_cols_temp = input_cols;
For Each({input_col, idx}, input_cols,
If(Contains(row_val, input_col),
aa_cols[input_col] = 1;
Remove From(input_cols_temp, idx);
);
);
input_cols = input_cols_temp;
);
-Jarmo