Here is the code that I would use....others may have better
Names Default To Here( 1 );
dt = Current Data Table();
selRows = dt << Get Rows Where( :gender == "M" );
For( i = 1, i <= N Rows( selRows ), i++,
:gender[selRows[i]] = Char( :age[selRows[i]] )
);
Jim