Use @jthi answer. But to explain what happened...
In your original two snippets, the first fails because there is no current row in the table so
:"Ppk"n <= 2
is comparing against a missing value; compares against missing are neither true or false and the true and false clause of the if are not executed (a surprising result if you don't know about missing values in JMP.)
dt=open("$sample_data/big class.jmp");
dt:age==14
. <<< no row selected, result is missing
row()=5; dt:age==13
0 <<< LILLIE is 12
In the second example, ForEachRow does make each row the current row, one at a time, so the first problem is avoided. Based on the unable to save at row 2 message, I'm pretty sure the first subset table is hanging on to the filename and the second subset made from row 2 wants to save to the same file, which is already in use. (edit:) close(dt_ppk) might resolve that, but it would still be recreating the same file, over and over again.
Craige