How do I lock all the columns in my JMP table with JSL?
Here is a simple example
Names Default To Here( 1 ); dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); for(i=1,i<=ncols(dt),i++, column(i)<<lock(1) )
Look in the Scripting Index for description and examples.
You can also do this interactively.
Select all your columns, right click, standardize attributes
From Attributes select lock
Enable Lock, press Apply, verify from column list columns are locked and press OK
JMP will also create a script to do this but it isn't as robust as the script provided by Jim (JMP created one has pre-determined columns in a list)
Local({old dt = Current Data Table()}, Current Data Table(Data Table("Big Class")); For Each({col, index}, {:name, :age, :sex, :height, :weight}, col << Lock(1)); Current Data Table(old dt); );
How do you see this JMP created script?
You have to have Log mode as Enhanced (I think this might be enabled by default since JMP JMP16/17+?)
Then you can open the Log (press Ctrt+Shift+L or View/Log).