Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2003
    Location
    India
    Posts
    4

    Unanswered: DB2 and Flat files

    Hi,

    I'm new in DB2. Can anyone tell me whether there is any command in DB2 to batch update the contents of a flat file into a DB2 table.

    Thanks
    Kaushik

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: DB2 and Flat files

    Have a look at the IMPORT and LOAD commands in Commnad Reference or Data Movement and Utilities Guide ...

    A link is provided in the 'Useful DB2 Stuff' for IBM's DB2 Manuals page

    HTH

    Sathyaram

    Originally posted by kachatterjee
    Hi,

    I'm new in DB2. Can anyone tell me whether there is any command in DB2 to batch update the contents of a flat file into a DB2 table.

    Thanks
    Kaushik
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: DB2 and Flat files

    BTW, I assumed you are using Unix/Windows platforms ...

    If yours is mainframe, it may be the LOAD command

    HTH

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  4. #4
    Join Date
    Sep 2003
    Location
    India
    Posts
    4

    Re: DB2 and Flat files

    I am using Windows 2000 ...
    Will db2sql92 help me?



    Originally posted by sathyaram_s
    BTW, I assumed you are using Unix/Windows platforms ...

    If yours is mainframe, it may be the LOAD command

    HTH

    Sathyaram

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    db2sql92 processes SQL statements in batch mode. It reads SQL statements from either a flat file or standard input, dynamically describes and prepares the statements, and returns an answer set.

    As Sathyaram mentioned, if your data is a flat file, then you probably can use the Load or Import utility as described in the DB2 Command Reference manual.

  6. #6
    Join Date
    Sep 2003
    Location
    India
    Posts
    4
    Thanks guys, I tried with import and it worked.



    Originally posted by Marcus_A
    db2sql92 processes SQL statements in batch mode. It reads SQL statements from either a flat file or standard input, dynamically describes and prepares the statements, and returns an answer set.

    As Sathyaram mentioned, if your data is a flat file, then you probably can use the Load or Import utility as described in the DB2 Command Reference manual.

Posting Permissions

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