HNT5QSPZ6P93
The following code will create a DDL of an existing table. If you don't need to create an output file omit the use of the -o option.
db2look -d MY_DB -a -e -x -o MY_FILE.sql
Republished from http://www.dba-db2.com/.