Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2003
    Location
    indiana
    Posts
    2

    Unanswered: generating ddl from os/390

    I need to be able to create a batch job that generates all DDL for a specified database in DB2 os/390. Does anyone have any experience with this? I think I can write straight SQL to query the catalog and format the DDL (a little hairy) but if anyone has already written the SQL and would like to share it, it would be appreciated.

    Thanks

  2. #2
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,

    I am not sure if this works for DB2 os/390, but it works for DB2 on Linux, Unix and Windows.

    Windows command:
    db2look -d database_name -i userid -w password -o c:\output_file.ddl -e -x -z schema -t table_name

    Omit the parameters that you don't need eg.: table_name.

    See the full help with command:
    db2look /?

    Hope this helps,
    Grofaty

  3. #3
    Join Date
    Sep 2003
    Location
    indiana
    Posts
    2
    Originally posted by grofaty
    Hi,

    I am not sure if this works for DB2 os/390, but it works for DB2 on Linux, Unix and Windows.

    Windows command:
    db2look -d database_name -i userid -w password -o c:\output_file.ddl -e -x -z schema -t table_name

    Omit the parameters that you don't need eg.: table_name.

    See the full help with command:
    db2look /?

    Hope this helps,
    Grofaty
    Well, that's kinda the problem. You can execute DB2LOOK against a mainframe database but only throught a remote connection (from windows or unix). I am in need of a batch job that runs on the mainframe for reasons to complicated to get into here. Anyway, thanks for the reply.

  4. #4
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    37
    You may find the below thread link useful:
    http://dbforums.com/arch/39/2003/1/648685

    HTH.

    Julius

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    DCLGEN will generate the table, but not the indexes, tablespaces, etc.

    BMC and Platinum both have products that do that, but of course they are expensive. But you might check to see if these products are already used by others at your installation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •