Results 1 to 3 of 3

Thread: Db2 Sql Clp

  1. #1
    Join Date
    Feb 2007
    Posts
    4

    Unanswered: Db2 Sql Clp

    I have a UNIX .sh script that invokes a DB2 SQL .sql script that contains the following:

    db2 -t -f parmtest.sql -z parm_output.log

    My question is how can I pass a parameter to the parmtest.sql script from the db2 clp (if it is possible) and how does one reference the parameter in the .sql script. The .sql script is not a procedure.

  2. #2
    Join Date
    Jun 2006
    Posts
    471

    param

    instead of using an input file, you could handle all in the script and use
    db2 ..... <<done
    statement with variables
    ..
    done
    in that case, the variables from the script will be translated in the db2 statements
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  3. #3
    Join Date
    Feb 2007
    Posts
    4
    ok, I follow you, thanks.

Posting Permissions

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