It's probably more efficient to do the SELECT WHERE all at once. I build dynamic select statements all the time and then use eval(parse()) to run them. Here's MS's example modified to do the select where in one go.
dt = Open( "$ENGLISH_SAMPLE_DATA/Big Class.jmp" );
cnames = {"age", "height", "weight"};
cspecs = {15, 62, 104};
select_string = "";
For (i = 1, i <= N Items(cnames), i++,
if (select_string == "",
// then
select_string = ":" || cnames[i] || " == " || char(cspecs[i]);
// else
,
select_string = select_string || " & " ||
":" || cnames[i] || " == " || char(cspecs[i]);
);
);
select_string = "dt << select where(" || select_string || ")";
eval(parse(select_string));
print(select_string);