Depending on what you want to happen next, there may be a better way to do what you have in mind (maybe using a data filter instance). But, if you want or need to use 'subset', try something like:
Names Default To Here( 1 );
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dts = dt << subset(By(:sex), Columns(:name, :age)); // Using 'By' makes a subset table for each level in the hspecified column. 'dts' is a list of associated table references
// Change the names of the subset tables
dts[1] << setName("Females");
dts[2] << setName("Males");