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



The SQL Script for any database object (independent whether DDS or SQL
described) can be determined in 2 ways:
1. IBM i Navigator --> Database --> position on the object --> Right click
and select Generate SQL (It is not yet included in ACS but it is planned for
one of the next updates)
2. Executing the SQL Stored Procedure GENERATE_SQL()
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/rzajq/rzajqprocg
ensql.htm

BTW if you change the generated (and even manually modified) SQL Script (for
DDS described physical files or SQL defined tables) to CREATE OR REPLACE
TABLE ....
And run the SQL script
1. DDS described physical files are converted into SQL tables
2. additional columns are added (even between existing columns)
3. Modified column definitions are updated
4. Data is conserved
5. dependent objects logical files, indexes, views, triggers, constraints
are still available and are if necessary updated.

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 Mike
Jones
Sent: Samstag, 11. Februar 2017 00:06
To: midrange-l@xxxxxxxxxxxx
Subject: Re: SQL statements for physical and logical files

You can also do a call to this function to generate the SQL for a table or
file. For a DDS file, not every DDS option is convertible to SQL DDL 100%
equivalently. Some DDS features are not supported in SQL.

https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%2
0i%20Technology%20Updates/page/QSYS2.GENERATE_SQL()%20procedure

Mike


message: 5
date: Fri, 10 Feb 2017 14:54:12 -0800
from: Alan Campin <alan0307d@xxxxxxxxx>
subject: Re: SQL statements for physical and logical files

All DDS or SQL defined tables are stored in SQL and you can retrieve
the source was SQL at anytime. I just using Ops Nav and go in and
right mouse on a table name in the database and say generate SQL. Make
sure you take the option to include system names. You should be able
to do the same thing in Data Studio.

On Fri, Feb 10, 2017 at 2:03 PM, William Howie <
William.Howie@xxxxxxxxxxxxxxxx> wrote:

Hello all,

Can anyone tell me if there is a system table on the iSeries that
stores the SQL statements that would be used for creating a
particular physical and/or logical file? Does the file have to have
been originally created with SQL instead of DDS for this kind of
information to even be kept anywhere or is it stored somewhere for
all files? On a related note,
does
the use of IBM Data Studio in any way help to facilitate finding
this
kind
of information? Any info would as always be appreciated. Thanks!

Bill

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

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.