If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Db2 Sql Clp

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-03-07, 16:23
oakwoodman oakwoodman is offline
Registered User
 
Join Date: Feb 2007
Posts: 4
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.
Reply With Quote
  #2 (permalink)  
Old 02-04-07, 03:33
guyprzytula guyprzytula is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 02-04-07, 12:24
oakwoodman oakwoodman is offline
Registered User
 
Join Date: Feb 2007
Posts: 4
ok, I follow you, thanks.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On