Why not just copy it with SQL:
create table TABLE_X as (
select * from TABLE
) with data
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Dean Eshleman <Dean.Eshleman@xxxxxxxxxxxx>
Sent: 03 November 2021 18:48
To: midrange-l@xxxxxxxxxxxxxxxxxx <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: How to copy an SQL table with a long name into the same library
Quite often when I'm testing, I will make a backup copy of a database file with data so that I can restore the data back to the original state after I run my test. I normally put the backup copy in the same library and add a SV or X extension. I'm trying to do this with a SQL table that has a long name (AGREEMENT_RECORDS) as well as the 10 character name (AGRMT) and it won't let me. I'm trying to do it with the CPYF statement specifying AGRMTSV as the target file and it fails. I assume it is because the long name is not unique in my library. Apparently, you would need to specify a new long name as well as a new short name when making the copy. However I haven't found a way to do that. Is there an SQL command that would do the rename and copy of the data in one step? How have others dealt with this issue?
Software Development Architect
1110 North Main Street
PO Box 483
Goshen, IN 46527
(800) 348-7468 ext. 3528
(574) 533-9515 ext. 3528
[Join our Talent Network]<http://www.everence.com/careers
Confidentiality Notice: This information is intended only for the individual or entity named. If you are not the intended recipient, do not use or disclose this information. If you received this e-mail in error, please delete or otherwise destroy it and contact us at (800) 348-7468 so we can take steps to avoid such transmission errors in the future. Thank you.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.