You can use Lag() to access values from other rows of a column. Then you can create a formula using Lag between those two columns you have
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
dt << New Column("S", Numeric, Continuous, Formula(
Lag(:weight) - :height
));
-Jarmo