Depends on the application.
You could initialize list and then add new table names to it with Insert Into() when needed (use << get name to datatable reference if needed).
Names Default To Here(1);
dt_name_list = {};
show(dt_name_list);
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
Insert Into(dt_name_list, dt1 << get name);
show(dt_name_list);
dt2 = Open("$SAMPLE_DATA/Cars.jmp");
Insert Into(dt_name_list, dt1 << get name);
show(dt_name_list);
Or you could get all open table names and then remove unnecessary ones from that list
Names Default To Here(1);
Open("$SAMPLE_DATA/Big Class.jmp");
Open("$SAMPLE_DATA/Cars.jmp");
dt_name_list = Get Data Table List() << get name;
-Jarmo