I could not resist try to script Karen's idea. Get value Labels return an expression with one argument: a list of "assignments", e.g. 2 = "No". I come to think of two approaches: either use these (illegal) assignments directly or as Xan suggests manipulate them into a Match expression.
Below are my attempts at both approaches. The Match approach is faster here. For large tables and if many values lack labels the performance appears to become more equal. The Match code can probably be be improved.
open_example_table = Expr(
dt = Open( "$SAMPLE_DATA/CrabSatellites.jmp" );
col = Column( dt, "color" );
col << data type( character );
);
//1
open_example_table;
bt = HP Time();
// Direct assignment code
v = Arg( col << get value labels(), 1 );
For( i = 1, i <= N Items( v ), i++,
col[dt << get rows where( col[] == Arg( v[i], 1 ) )] = Arg( v[i], 2 )
);
// End direct assignment
ht = HP Time();
t1 = ht - bt;
Close( dt, no save );
// 2
open_example_table;
bt = HP Time();
// code for building Match expression by string manipulation
match_expr = Parse(
"Match( col[]," || Substitute( Char( Arg( col << get value labels(), 1 ) ),
"{", "",
"=", ",",
"}", ""
) || ",col[])"
);
For Each Row( col[] = match_expr );
// End Match
ht = HP Time();
t2 = ht - bt;
Show( t1, t2 );
t1 = 1729;
t2 = 1019;
//:*/