# Changer Owner name on TPS Super file / Megafiles

**URL:** <https://clarionhub.com/t/changer-owner-name-on-tps-super-file-megafiles/6258>\
**Category:** uncategorized\
**Created:** [May 22, 2023, 10:42am UTC](https://clarionhub.com/t/changer-owner-name-on-tps-super-file-megafiles/6258 "2023-05-22T10:42:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BILAZ](https://clarionhub.com/letter_avatar_proxy/v4/letter/b/ecd19e/32.png) [@BILAZ](https://clarionhub.com/u/BILAZ)\
**Post date:** [May 22, 2023, 10:42am UTC](https://clarionhub.com/t/changer-owner-name-on-tps-super-file-megafiles/6258/1 "2023-05-22T10:42:33Z")

</div>

Hello  
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

Thanks

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [May 22, 2023, 1:16pm UTC](https://clarionhub.com/t/changer-owner-name-on-tps-super-file-megafiles/6258/2 "2023-05-22T13:16:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [May 22, 2023, 1:34pm UTC](https://clarionhub.com/t/changer-owner-name-on-tps-super-file-megafiles/6258/3 "2023-05-22T13:34:44Z")

</div>

You may be able to use TopCopy

 ![image](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/4/43a36d0823e0e46de0ac0784d42d7f9d55176cee.png)

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [May 22, 2023, 1:49pm UTC](https://clarionhub.com/t/changer-owner-name-on-tps-super-file-megafiles/6258/4 "2023-05-22T13:49:23Z")

</div>

> > 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. 🙂

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [May 22, 2023, 2:03pm UTC](https://clarionhub.com/t/changer-owner-name-on-tps-super-file-megafiles/6258/5 "2023-05-22T14:03:49Z")

</div>

> [@jslarve](#):
>
> then copy each record of each table individually.

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

---

<div class="post-metadata">

**Author:** ![BILAZ](https://clarionhub.com/letter_avatar_proxy/v4/letter/b/ecd19e/32.png) [@BILAZ](https://clarionhub.com/u/BILAZ)\
**Post date:** [May 22, 2023, 2:55pm UTC](https://clarionhub.com/t/changer-owner-name-on-tps-super-file-megafiles/6258/6 "2023-05-22T14:55:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [May 22, 2023, 7:42pm UTC](https://clarionhub.com/t/changer-owner-name-on-tps-super-file-megafiles/6258/7 "2023-05-22T19:42:41Z")

</div>

> [@CarlBarnes](#):
>
> > [@jslarve](#):
> >
> > then copy each record of each table individually.
> 
> Rather that looping records I think you can use Super file syntax (`xxx.tps\!name`) with the COPY() statement.

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.
