@ih and @ms have given you good answers but I was already working on this solution, so I thought I'd post it to show another way to do this, via JSL.
Taking advantage of the Subset By option in Subset we can get a table for each subgroup, and then get the values from the Name column and use Concat Items() to build the string of names.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt_list = dt << Subset(
By( :sex ),
All rows,
Selected columns only( 0 ),
columns( :name, :age, :height, :weight ),
private
);
nt = New Table();
group_col_name = Word( 1, dt_list[1] << get name, "=" );
nt << New Column( group_col_name, character );
nt << New Column( "concat name" );
nt << add rows( N Items( dt_list ) );
For( i = 1, i <= N Items( dt_list ), i++,
Column( nt, group_col_name )[i] = Word( 2, dt_list[i] << get name, "= " );
nt:concat name[i] = Concat Items( dt_list[i]:name << get values, ", " );
);
For( i = 1, i <= N Items( dt_list ), i++,
Close( dt_list[1], nosave )
);
dt_list = Empty();
-Jeff