Use the get rows where capability:
dt = open("$sample_data\Big Class.jmp");
match_rows = dt << get rows where(:sex == "F");
print(match_rows);
[1, 2, 3, 4, 5, 9, 10, 11, 16, 17, 18, 19, 20, 28, 29, 35, 36, 38]
The match_rows variable is a matrix that you can reference by the index. I.e. match_rows[1] is the first element, etc.