The scripting index shows a function you could use to get the column group names. You could use each of those names to call the get column group method and build a full list to pass to the platform you are running. Roughly:
// untested
groupnames = dt<<getcolumngroupnames;
biglist={};
for(igroup=1,igroup<=nitems(groupnames),igroup+=1,
insertinto(biglist, dt<<getcolumngroup( groupnames[igroup] ));
);
show(biglist);
... X(biglist) ...
scripting index
Craige