× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



What about the following solution:
1. Determine the original CREATE TABLE Statement with either IBM i Navigator
or ACS --> Generate SQL or the stored procedure GENERATE_SQL().
2. Once you have retrieved the SQL Skipt, modify it by adding OR REPLACE and
by adding the new table format or by replacing the existing format with a
different format name.

Just try it by our self, by executing the following SQL Statements (after
the last commit just retrieve the CREATE OR REPLACE TABLE statement with
reverse engineering.
Create Table YourSchema.MyTableFmt
(MyInt Integer Not Null Default,
MyChar VarChar(10) Not NULL Default)
RcdFmt MyTableFX;

Commit;;

Insert into YourSchema.MyTableFmt
Values(1, 'A'), (20, 'BB'), (300, 'CCC'), (4000, 'DDDD');

Select * from YourSchema.MyTableFmt;

Create or Replace table YourSchema/MyTableFmt
(MyInt Integer Not Null Default,
MyChar VarChar(10) Not NULL Default)
RcdFmt MyTableF1;

Commit;

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Matt
Olson
Sent: Donnerstag, 16. Februar 2017 15:43
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: RE: Change Record Format Name

I'll put in a requirement. The create table already has a rcdfmt option so
no need to do below option if you remember about the record format name. The
alter table rename however does not know about rcdfmt, but should.

Now I am stuck with creating new table, changing journaling properties,
setting up permissions, copying data from old table into new table, deleting
old table.

Not an efficient use of time I have to say.

-----Original Message-----
From: Roger Harman [mailto:roger.harman@xxxxxxxxxxx]
Sent: Wednesday, February 15, 2017 6:27 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: RE: Change Record Format Name

That's the way I've done it on a recent project.


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Peter
Dow
Sent: Wednesday, February 15, 2017 2:35 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Change Record Format Name

Hi Matt,

No way to rename it after the fact, however, if you're stuck on an old
system without the RCDFMT keyword on the CREATE TABLE statement, the work
around was to create the table with name of the record format, then after it
was created, rename the table as the actual table name.

For example,

CREATE TABLE myRcdFmt...
RENAME TABLE myRcdFmt TO myTable

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx> pdow@xxxxxxxxxxxxxx
<mailto:pdow@xxxxxxxxxxxxxx>

/
On 2/15/2017 11:24 AM, Matt Olson wrote:
All,

What is the rename command to change a record format name?

We have this SQL available to change the SQL Long Name, SQL Short Name
(System Name), but I don't see RCDFMT name.

Example:
RENAME TABLE LongName TO LongTableName FOR SYSTEM NAME LongName;

But what about changing record format names?

Thanks

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.