Try this:
dt=open("$sample_data/big class.jmp");
lookup=associativearray((dt<<getcolumnreference)<<getname,1::ncols(dt));
show(lookup["age"],lookup["height"]);
lookup["age"] = 2;
lookup["height"] = 4;
The associative array must be rebuilt if the columns are moved/deleted/added in the table. dt<<GetColumnReference returns a list of columns; sending that list the <<GetName message produces a list of the string names of the columns that can be used as the keys to the associative array. The matrix 1::ncols(dt) makes the values for the associative array. The lookups are then done with the string name of the column.
There is also a dt<<GetColumnNames message that returns the names (not strings) of the columns. Those names are harder to work with than the list of columns from dt<<GetColumnReference. The column<<GetName message returns a string (in spite of its name). In the example, <<GetName is sent to a { list of columns } which causes the message to be sent to each item in the list and a new list is built from the results.
Craige