cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
AsymptoticCos
Level II

Locking all columns in JMP

How do I lock all the columns in my JMP table with JSL? 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Locking all columns in JMP

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.

Jim

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: Locking all columns in JMP

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.

Jim
jthi
Super User

Re: Locking all columns in JMP

You can also do this interactively.

Select all your columns, right click, standardize attributes

jthi_0-1718860168534.png

From Attributes select lock

jthi_1-1718860187913.png

jthi_2-1718860201952.png

Enable Lock, press Apply, verify from column list columns are locked and press OK

jthi_3-1718860227869.png

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);
);
-Jarmo
AsymptoticCos
Level II

Re: Locking all columns in JMP

How do you see this JMP created script? 

jthi
Super User

Re: Locking all columns in JMP

You have to have Log mode as Enhanced (I think this might be enabled by default since JMP JMP16/17+?)

jthi_0-1718902467678.png

Then you can open the Log (press Ctrt+Shift+L or View/Log).

-Jarmo