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



You could also create modified DDS source to specify ALIAS names for the fields, and then use CHGPF to alter the table.
You can also use the SQL ALTER TABLE statement directly against a physical file that was originally created by using DDS and CRTPF.

On Friday, November 30, 2018, 3:09:38 PM EST, Jack Callahan <jjcllhn@xxxxxxxxx> wrote:

Is the table in question is SQL or DDS defined?

If it is SQL defined, CREATE OR REPLACE TABLE should allow you to do what
you want

CREATE OR REPLACE TABLE myschema.mySQLtablename FOR SYSTEM NAME myddsfile (

FancySQLname FOR COLUMN COLUMN1 CHAR(40) CCSID 37 NOT NULL DEFAULT '' ,
        FancySQLname2 FOR COLUMN COLUMN2 CHAR(40) CCSID 37 NOT NULL DEFAULT
''
...)

If the underlying file is still DDS defined, you have two options I can
think of:

1) build a VIEW over the DDS PF  The resulting view will be updateable.
Point the SQL developers at the view rather than the underlying physical
table. No risk to existing programs attached to the current DDS format.


CREATE OR REPLACE VIEW  myschema.mySQLviewname
(FancySQLName FOR COLUMN COLUMN1,FancySQLName2 FOR COLUMN COLUMN2)
AS SELECT COLUMN1,COLUMN2 FROM myschema.myddsfile;


2) rebuild the file using SQL.

IBM provides tools to generate the SQL from existing tables, even if DDS
created.
You need to worry about level checks and existing program usage if you go
this route

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.