If I'm understanding your post correctly, it looks like your invoked script is creating "categories" in your data table by creating multiple column groups. Those column groups will have names like "Reject", "Engineering", "Etc...".
After you have run your invoked script, you can get the list of column groups from your data table by using the "get column groups names" function. An example is shown below:
names default to here(1);
dt = current data table();
categoryList = dt << get column groups names;
show(categoryList);
To take it one step farther, after you get your list of categories, you can loop through the list and use the "get column group" function to get the list of all the test measurement columns that are within each column group. Here's an example:
names default to here(1);
dt = current data table();
categoryList = dt << get column groups names;
for( k = 1, k <= n items( categoryList ), k++,
show( categoryList[k] );
colList = dt << get column group( categoryList[k] );
print( colList );
);