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 > Passing custom arguments to command-line db2 processor. Possible?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-08-06, 06:18
Navik Navik is offline
Registered User
 
Join Date: Dec 2006
Posts: 3
Exclamation 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} ....
?
Reply With Quote
  #2 (permalink)  
Old 12-08-06, 08:09
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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
Reply With Quote
  #3 (permalink)  
Old 12-08-06, 08:47
Navik Navik is offline
Registered User
 
Join Date: Dec 2006
Posts: 3
Thanks for blowning sky-high :)

Thanks for info
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