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 > Question about running a db2 script...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-13-06, 13:36
oca95 oca95 is offline
Registered User
 
Join Date: Jan 2006
Posts: 6
Question about running a db2 script...

I'm using a command db2 -tvf in the command window. ex:
db2 -tvf script.txt > script.out

I would like to search for strings in the output file. Is this possible with any db2 commands, sorta like grep, and find in Unix?
Reply With Quote
  #2 (permalink)  
Old 01-13-06, 14:14
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Yes. You could load the output file into a varchar column and then do a SELECT ... WHERE OUTPUT LIKE '%whatever%'
Reply With Quote
  #3 (permalink)  
Old 01-16-06, 09:13
sun4u sun4u is offline
Registered User
 
Join Date: Dec 2005
Posts: 18
If you are using Windows 2003 or XP

Use "Windows 2003 Resource Kit", it has qgrep, tail, etc dos commands.

http://www.microsoft.com/downloads/d...displaylang=en
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