On 29-Mar-2012 08:42 , Stone, Joel wrote:
Is it possible to create a file by inheriting all the fields and
attributes from an existing PF, and adding a new field to the end of
the row?

(Without defining each existing field in the CREATE TABLE

Many ways; depending on many possible requirements or restrictions, according to the specifics of a scenario. Expectations for effect will vary widely so no /one way/ will always suffice. Each means will have its own caveats, limitations, and nuances that [attempt to] resolve or suffer from the complexities associated in so doing, here are a few:

create table FileName2 like FileName -- parentheses change effect
alter table FileName2 add column ...

crtdupobj FileName LibrName *FILE LibrName2 FileName2 ...
alter table FileName2 add column ... /* or chgpf srcfile() */

retrieve existing DDL, insert new column source, execute immed

savobj and rstobj with rename(s) before and\or after save

update the production DDL, create and promote new TABLE, then
effect alter or other means to upgrade existing TABLE

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2021 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.