DB2 export from the iSeries - IBM AS400

This is a discussion on DB2 export from the iSeries - IBM AS400 ; I need to export DB2 data from an iSeries to a PC DB2 database whilst preserving the relationships e.g. foreign keys. Are there any tools to do this - I've tried CPYTOIMPF to csv files but can't manage to retain ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: DB2 export from the iSeries

  1. DB2 export from the iSeries

    I need to export DB2 data from an iSeries to a PC DB2 database whilst
    preserving the relationships e.g. foreign keys. Are there any tools to
    do this - I've tried CPYTOIMPF to csv files but can't manage to retain
    the metadata

    Thanks

  2. Re: DB2 export from the iSeries

    Will wrote:
    > I need to export DB2 data from an iSeries to a PC DB2 database whilst
    > preserving the relationships e.g. foreign keys. Are there any tools to
    > do this - I've tried CPYTOIMPF to csv files but can't manage to retain
    > the metadata
    >


    There may be more automated methods, but there is a "generate DDL"
    option in iSeries Navigator, and there is the "generate DDL" API
    (QSQGNDDL). Programmatically one could query catalogs to get a list of
    SQL tables etc, and based on that call the API to get DDL for each
    object of interest.

    http://publib.boulder.ibm.com/infoce...s/qsqgnddl.htm
    http://www.ibmsystemsmag.com/i5/octo...r/18376p1.aspx
    http://www.mcpressonline.com/program...rtvsqlsrc.html

    --
    Karl Hanson


  3. Re: DB2 export from the iSeries

    On Aug 7, 12:55*pm, Will wrote:
    > I need to export DB2 data from an iSeries to a PC DB2 database whilst
    > preserving the relationships e.g. foreign keys. Are there any tools to
    > do this - I've tried CPYTOIMPF to csv files but can't manage to retain
    > the metadata
    >
    > Thanks


    Most of the older AS/400 applications used DDS to define their
    database tables and don't explicitly set foreign keys. You should
    find that unique primary keys are defined but often the relationship
    between tables was enforced by RPG or COBOL code.

    Jack Perkins
    www.iadoreyour.com

  4. Re: DB2 export from the iSeries

    On 10 Aug, 09:18, JACK.PERK...@iadoreyour.com wrote:
    > On Aug 7, 12:55*pm, Will wrote:
    >
    > > I need to export DB2 data from an iSeries to a PC DB2 database whilst
    > > preserving the relationships e.g. foreign keys. Are there any tools to
    > > do this - I've tried CPYTOIMPF to csv files but can't manage to retain
    > > the metadata

    >
    > > Thanks

    >
    > Most of the older AS/400 applications used DDS to define their
    > database tables and don't explicitly set foreign keys. *You should
    > find that unique primary keys are defined but often the relationship
    > between tables was enforced by RPG or COBOL code.
    >
    > Jack Perkinswww.iadoreyour.com


    Thanks guys

    I'm exploring a product called DB2 Connect that should allow me to
    connect to the dbase on the 400 - I can subsequently use the utilities
    DB2look and DB2move (part of the DB2 product) to extract SQL DDL.
    Unfortunately at the moment the trial product I have from IBM says
    licence expired!

    Some Links for future reference (The db2 connect trial comes with DB2
    for the PC)
    http://www-306.ibm.com/software/data/db2/db2connect/



+ Reply to Thread