Your code works fine. Given a data table
and running a copy of your code
names default to here(1);
dt=current data table();
col={"A", "B"};
For( i = 1, i<= N Items( col ), i++,
empty_rows = dt << get rows where (is missing(as column(dt, col[i])));
if (nrows(empty_rows) > 0,
as column(dt, col[i])[empty_rows] = "N";
);
);
It results in the following
The issue you may be having is if your A,B,C,D,E columns are numeric, you will not be able to place a character value into the cell. JMP will convert it to a missing value "."
Jim