Changer Owner name on TPS Super file / Megafiles

I have a megafile containing n tables
ex Myfile.tps!Table1 Myfile.tps!Table2
with an owner name ex secu1

How to automatically change the owner for all tables in the megafile without having to do it table by table


The only option is to create a new file with the new owner ID then copy each record of each table individually. With TPS,all of the tables within a superfile must use the same owner ID.

You may be able to use TopCopy


That won’t work if the parent tables have different owner ID.

looks like I was wrong about that. Could have sworn I have tried that before, but it just worked in C10 topcopy. :slight_smile:

Rather that looping records I think you can use Super file syntax (xxx.tps\!name) with the COPY() statement.

Thank you so much
TOPCOPY is a better solution
I just changed owner name of a megafile containing 88 tables very quickly

That doesn’t work in my test if the owner ID is different. If they’re different, I get an ERROR 36 “Invalid Data File”. This jibes with my previous experiences.

But I incorrectly assumed the same would be true for TOPCOPY.

If you wish to do a one-off owner conversion, then TOPCOPY looks like the way to go. Otherwise, if you’re writing a conversion program, you need to go from one table to another, record by record.