Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2006
    Posts
    3

    Exclamation Unanswered: Passing custom arguments to command-line db2 processor. Possible?

    I have some script bububu.db2, that IMPORTS data from some file:
    IMPORT FROM "blablabla.txt" ... INSERT INTO lalala ....

    Now blablabla and lalala are hardcoded. Is it possible to supply them as parameters in command line, something like
    db2cmd /C db2 -cf bububu.db2 -filename=blablabla.txt -table=lalala
    and use some construction like
    IMPORT FROM "{filename}" ... INSERT INTO {table} ....
    ?

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    No, you can't pass these arguments to CLP. However, you can pass them to a Windows batch file, which would contain something like:
    Code:
    db2 connect to ....
    db2 import from %1 ... insert into %2
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Dec 2006
    Posts
    3

    Thanks for blowning sky-high :)

    Thanks for info

Posting Permissions

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