You are approaching the problem correctly, you just have some syntax issues. Below is a working version of your code
Names Default To Here( 1 );
dt = Current Data Table();
// Select the columns to be evaluated
// ColList = {"x_1","x_2","x_3","x_4","x_5","x_6"};
// or if there is a programmatic way to get the list,
// do something like below
ColList = dt << get column names( numeric, string );
// Loop backwards through the list so the "i" index
// maintains it's proper reference
For( i = N Items( ColList ), i >= 1, i--,
If( Left( ColList[i], 2 ) != "x_",
ColList = Remove( ColList, i, 1 )
)
);
// Loop across ColList and set the values qualified
// values to missing
For( i = 1, i <= N Items( ColList ), i++,
// The line below takes advantage of a JMP feature where
// you can change specific values in a column in one statement
// by just using a matrix of the rows you want to change
// Column A[5,6,9,22] = 4;
// This would set a column named "Column A"'s rows 5,6,9 and 22
// to the value of 4
// In your case, you want to eliminate the cell value, so the
// line sets the value to a missing value, which in JMP is "."
Column( dt, ColList[i] )[dt << get rows where( As Column( dt, ColList[i] ) == 8 )] = .;
);
Jim