Which JMP version are you using? I have 15.2.1 and this seems to be working:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
dt = New Window("Example",
tb = Table Box(
String Col Box("lotid", dt:lot_id << get as matrix),
String Col Box("waferinlot", dt:"Wafer ID in lot ID" << get as matrix),
Number Col Box("NPN1", dt:NPN1 << get as matrix),
Number Col Box("PNP1", dt:PNP1 << get as matrix),
Number Col Box("PNP2", dt:PNP2 << get as matrix),
Number Col Box("NPN2", dt:NPN2 << get as matrix),
Number Col Box("PNP3", dt:PNP3 << get as matrix),
Number Col Box("IVP1", dt:IVP1 << get as matrix),
Number Col Box("PNP4", dt:PNP4 << get as matrix),
Number Col Box("NPN3", dt:NPN3 << get as matrix),
Number Col Box("IVP2", dt:IVP2 << get as matrix)
)
);
tb << Set Scrollable(30, 4);
show(tb << Get Locked Columns);
tb << Set Locked Columns(2);
show(tb << Get Locked Columns);
-Jarmo